Browse Source

org_emacs_reader: Replace all "org_reader" by "org_emacs_reader"

Gendre Sébastien 7 years ago
parent
commit
cfcba6ea58
2 changed files with 13 additions and 13 deletions
  1. 3 3
      org_emacs_reader/README.md
  2. 10 10
      org_emacs_reader/org_reader.py

+ 3 - 3
org_emacs_reader/README.md

@@ -2,18 +2,18 @@
 
 
 Publish Emacs Org files alongside the rest of your website or blog.
 Publish Emacs Org files alongside the rest of your website or blog.
 
 
-- `ORG_READER_EMACS_LOCATION`: Required. Location of Emacs binary.
+- `ORG_EMACS_READER_EMACS_LOCATION`: Required. Location of Emacs binary.
   If you use `Emacs for Mac OS X`,
   If you use `Emacs for Mac OS X`,
   the location should be `/Applications/Emacs.app/Contents/MacOS/Emacs`,
   the location should be `/Applications/Emacs.app/Contents/MacOS/Emacs`,
   rather than `/usr/bin/emacs`.
   rather than `/usr/bin/emacs`.
 
 
-- `ORG_READER_EMACS_SETTINGS`: Optional. An absolute path to an Elisp file, to
+- `ORG_EMACS_READER_EMACS_SETTINGS`: Optional. An absolute path to an Elisp file, to
   run per invocation. Useful for initializing the `package` Emacs library if
   run per invocation. Useful for initializing the `package` Emacs library if
   that's where your Org mode comes from, or any modifications to Org Export-
   that's where your Org mode comes from, or any modifications to Org Export-
   related variables. If you want to use your standard emacs init file, you 
   related variables. If you want to use your standard emacs init file, you 
   can ignore this variable.
   can ignore this variable.
 
 
-- `ORG_READER_BACKEND`: Optional. A custom backend to provide to Org. Defaults
+- `ORG_EMACS_READER_BACKEND`: Optional. A custom backend to provide to Org. Defaults
   to `'html`.
   to `'html`.
 
 
 To provide metadata to Pelican, the following properties can be defined in
 To provide metadata to Pelican, the following properties can be defined in

+ 10 - 10
org_emacs_reader/org_reader.py

@@ -6,14 +6,14 @@ Version 1.1.
 
 
 Relevant Pelican settings:
 Relevant Pelican settings:
 
 
-- ORG_READER_EMACS_LOCATION: Required. Location of Emacs binary.
+- ORG_EMACS_READER_EMACS_LOCATION: Required. Location of Emacs binary.
 
 
-- ORG_READER_EMACS_SETTINGS: Optional. An absolute path to an Elisp file, to
+- ORG_EMACS_READER_EMACS_SETTINGS: Optional. An absolute path to an Elisp file, to
   run per invocation. Useful for initializing the `package` Emacs library if
   run per invocation. Useful for initializing the `package` Emacs library if
   that's where your Org mode comes from, or any modifications to Org Export-
   that's where your Org mode comes from, or any modifications to Org Export-
   related variables.
   related variables.
 
 
-- ORG_READER_BACKEND: Optional. A custom backend to provide to Org. Defaults
+- ORG_EMACS_READER_BACKEND: Optional. A custom backend to provide to Org. Defaults
   to 'html.
   to 'html.
 
 
 To provide metadata to Pelican, the following properties can be defined in
 To provide metadata to Pelican, the following properties can be defined in
@@ -50,7 +50,7 @@ from pelican import readers
 from pelican import signals
 from pelican import signals
 
 
 
 
-ELISP = os.path.join(os.path.dirname(__file__), 'org_reader.el')
+ELISP = os.path.join(os.path.dirname(__file__), 'org_emacs_reader.el')
 LOG = logging.getLogger(__name__)
 LOG = logging.getLogger(__name__)
 
 
 
 
@@ -64,19 +64,19 @@ class OrgReader(readers.BaseReader):
 
 
     def __init__(self, settings):
     def __init__(self, settings):
         super(OrgReader, self).__init__(settings)
         super(OrgReader, self).__init__(settings)
-        assert 'ORG_READER_EMACS_LOCATION' in self.settings, \
-            "No ORG_READER_EMACS_LOCATION specified in settings"
+        assert 'ORG_EMACS_READER_EMACS_LOCATION' in self.settings, \
+            "No ORG_EMACS_READER_EMACS_LOCATION specified in settings"
 
 
     def read(self, filename):
     def read(self, filename):
         LOG.info("Reading Org file {0}".format(filename))
         LOG.info("Reading Org file {0}".format(filename))
-        cmd = [self.settings['ORG_READER_EMACS_LOCATION']]
+        cmd = [self.settings['ORG_EMACS_READER_EMACS_LOCATION']]
         cmd.extend(self.EMACS_ARGS)
         cmd.extend(self.EMACS_ARGS)
 
 
-        if 'ORG_READER_EMACS_SETTINGS' in self.settings:
+        if 'ORG_EMACS_READER_EMACS_SETTINGS' in self.settings:
             cmd.append('-l')
             cmd.append('-l')
-            cmd.append(self.settings['ORG_READER_EMACS_SETTINGS'])
+            cmd.append(self.settings['ORG_EMACS_READER_EMACS_SETTINGS'])
 
 
-        backend = self.settings.get('ORG_READER_BACKEND', "'html")
+        backend = self.settings.get('ORG_EMACS_READER_BACKEND', "'html")
 
 
         cmd.append('-l')
         cmd.append('-l')
         cmd.append(ELISP)
         cmd.append(ELISP)