Coder Social home page Coder Social logo

tinkerer's Introduction

Announcement

Tinkerer is retired in favor of Baku.

Tinkerer has been around since 2011 but hasn't been actively developed for a few years now. The project is using Sphinx for rendering, unfortunately some of the core functionality required by Tinkerer stopped working in newer Sphinx versions. The Sphinx dependency has been pinned at version 1.7.1, but this is quite old and it is no longer working properly with the latest Python versions.

A lot has changed since 2011. Markdown is now ubiquitous and it supports some of the content types that used to only work with reStructuredText, like math, footnotes, and tables. Developing for the web is easier.

Baku takes the learnings from Tinkerer and provides the same familiar command line interface but uses Markdown for content, achieves the same look & feel with much lighter HTML/CSS, and fewer dependencies. It is a modern take on Tinkerer which I hope you try and enjoy.

You can migrate an existing blog using reStructuredText to Markdown by using Pandoc.

tinkerer's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tinkerer's Issues

Translate archive_link

The "Blog Archive" string from boilerplate/aggregated.html are not translate. It is generate from

 <div class="archive_link">
     <a href="{{ pathto('archive') }}">{{ archivechar }}{{ archive_title }}{{ archivechar }}</a>
 </div>

No explicit RSS link for the flat theme

Other themes, e.g modern5, has an RSS link in the navbar, while flat doesn't. I was wondering if there is a way to display the RSS link for the flat theme, or is it a "gotcha" feature?

HTTPS support on external resources

I'm preparing to host my blog with HTTPS, but I got warning in Chrome console:

Mixed Content: The page at XXX was loaded over HTTPS, but requested an insecure script XXXX. This request has been blocked; the content must be served over HTTPS.

With a quick look, I found the disqus is by default http (as indicated here at disqus.js). Besides, if using custom CSS, after build, there will be a flat.css in the resulting html/_static/flat.css that has the following http url:

@import url(https://fonts.googleapis.com/css?family=PT+Sans:400,700,400italic,700italic);
@import url(https://fonts.googleapis.com/css?family=Source+Code+Pro);body { font-family: 'PT Sans', Helvetica, Arial, sans-serif; }

although I explicitly set https in my primary custom css file at _static/style.css as follows:

@import url('https://fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400,400italic,500,600');

I have to manually edit the built HTML files before pushing to GitHub Pages.

I was looking forward to a new feature that includes https.

build error html In Japanese Windows 8 environment

In Japanese Windows 8 environment

Always following error is occurred.

$ tinker -v
Tinkerer version 1.2.1

$ tinker -s
Your new blog is almost ready!
You just need to edit a couple of lines in conf.py

$ tinker -p 'test page'
New post created as 'C:\Users\Takekazu\tmp\test1\2013\10\11\test_page.rst'

$ tinker -b
Making output directory...
Running Sphinx v1.1.3
loading pickled environment... not yet created
building [html]: targets for 2 source files that are out of date
updating environment: 2 added, 0 changed, 0 removed
reading sources... [ 50%] 2013/10/11/test_page

Sphinx error:
'utf8' codec can't decode byte 0x8c in position 2: invalid start byte

After remove setlocale in metadata.py. It's works.

$ git diff .\metadata.py
diff --git a/tinkerer/ext/metadata.py b/tinkerer/ext/metadata.py
index 9dc713b..fa3f49d 100644
--- a/tinkerer/ext/metadata.py
+++ b/tinkerer/ext/metadata.py
@@ -26,7 +26,7 @@ def initialize(app):
     app.builder.env.blog_metadata = dict()

     # make sure we use system locale for date formatting
-    locale.setlocale(locale.LC_TIME, '')
+#    locale.setlocale(locale.LC_TIME, '')

"tinker -b" not working. Version 1.4.2

I created blog http://sandeeps.in with tinkerer 1.2.1. Today after 8 months decided to install tinkerer on new UBUNTU14 machine. Installed using pip. But it doesn't build my blog anymore with tinkerer 1.4.2.

sandeep@karyashala:/opt/sandeeps/en$ ls
2013 2014 403.rst 404.rst blog conf.py conf.pyc _copy drafts flask index.html master.rst pages _static _templates

sandeep@karyashala:/opt/sandeeps/en$ tinker -b
Sphinx v1.3b1
Usage: tinker [options] sourcedir outdir [filenames...]

Filename arguments:
without -a and without filenames, write new and changed files.
with -a, write all files.
with filenames, write these.

tinker: error: -b option requires an argument

sandeep@karyashala:/opt/sandeeps/test$ tinker --build
Sphinx v1.3b1
Usage: tinker [options] sourcedir outdir [filenames...]

Filename arguments:
without -a and without filenames, write new and changed files.
with -a, write all files.
with filenames, write these.

tinker: error: no such option: --build
sandeep@karyashala:/opt/sandeeps/test$

Invalid RSS feeds

Hi folks,

i've recently noticed that the RSS feeds contain unescaped "&"s in title elements.
"<title>Free Software & Linux Days 2010</title>"
thus my RSS parser can't parse the generated RSS' by tinkerer.
I hope that it can be fixed in future releases.

Dates don't work with localization correctly

While working on a Slovak translation I noticed that dates didn't translate
properly. This seems to be caused by a mismatch of the date text (look for
uistr.py:42 in each .po file) with the text in the actual uistr.py source.
Updating the text by copying from the source file fixed the problem
(for Slovak). It seems most or all the .po files have this mismatch.

Also, the file line numbers in most the .po files seem to be outdated
(although I have no experience with .po - are these just comments?)

Timestamp with post time (hh:mm:ss)

It would be really cool if we could have publication time in the post timestamp.

This is useful if you write several posts a day. It's vital for blogs used to indicate some online service status.

Add support for incremental build

Right now there is no support for incremental build.

$ tinker -s
Your new blog is almost ready!
You just need to edit a couple of lines in conf.py
$ tinker -b
Making output directory...
Running Sphinx v1.2.3
loading pickled environment... failed: [Errno 2] No such file or directory: '/tmp/inc/blog/doctrees/environment.pickle'
building [html]: targets for 1 source files that are out of date
updating environment: 1 added, 0 changed, 0 removed
reading sources... [100%] master

looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] master

writing additional files... search
copying static files... WARNING: favicon file 'tinkerer.ico' does not exist
done
copying extra files... done
dumping search index... done
dumping object inventory... done
build succeeded, 1 warning.
$ tinker -b
Making output directory...
Running Sphinx v1.2.3
loading pickled environment... failed: [Errno 2] No such file or directory: '/tmp/inc/blog/doctrees/environment.pickle'
building [html]: targets for 1 source files that are out of date
updating environment: 1 added, 0 changed, 0 removed
reading sources... [100%] master

looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] master

writing additional files... search
copying static files... WARNING: favicon file 'tinkerer.ico' does not exist
done
copying extra files... done
dumping search index... done
dumping object inventory... done
build succeeded, 1 warning.

This isn't a problem if you have a few posts but after some years this became a problem because build the blog can take a few minutes depending of how many posts you have and your machine.

UnicodeDecodeError: 'ascii' codec can't decode byte

Copy/paste from bitbucket issue tracker:

Christian Jann created an issue 2012-08-05
[chris@thinkpad tinkerer.git]$ tinker -p "test: äüöß"
Traceback (most recent call last):
File "/usr/bin/tinker", line 9, in
load_entry_point('Tinkerer==0.4b', 'console_scripts', 'tinker')()
File "/usr/lib/python2.7/site-packages/Tinkerer-0.4b-py2.7.egg/tinkerer/cmdline.py", line 172, in main
create_post(command.post[0], command.quiet, command.filename)
File "/usr/lib/python2.7/site-packages/Tinkerer-0.4b-py2.7.egg/tinkerer/cmdline.py", line 75, in create_post
new_post = post.create(title)
File "/usr/lib/python2.7/site-packages/Tinkerer-0.4b-py2.7.egg/tinkerer/post.py", line 74, in create
post.write()
File "/usr/lib/python2.7/site-packages/Tinkerer-0.4b-py2.7.egg/tinkerer/post.py", line 65, in write
"tags" : tags})
File "/usr/lib/python2.7/site-packages/Tinkerer-0.4b-py2.7.egg/tinkerer/writer.py", line 25, in render
dest.write(env.get_template(template).render(context).encode("utf8"))
File "/usr/lib/python2.7/site-packages/jinja2/environment.py", line 894, in render
return self.environment.handle_exception(exc_info, True)
File "/usr/lib/python2.7/site-packages/Tinkerer-0.4b-py2.7.egg/tinkerer/__templates/post.rst", line 1, in top-level template code
{{ title }}
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 6: ordinal not in range(128)
ÄÜÖäüöß are frequently used German letters, they should work.

Comments (5)
Vlad Riscutia
edited description
assigned issue to Vlad Riscutia
2012-08-05
Atamert Ölçgen
I can confirm this issue.
Workaround is to manually edit the heading inside the file, since these chars are not slug friendly anyway.

Mark as spam Delete 2012-10-14
Christian Jann
I've added a fix here: https://bitbucket.org/christianjann/tinkerer/commits/5f29318e338f4d5d88d89da28d1c9d6b7b80c9fa.
A solution that will also work with python 3:

import sys

elif command.post:

  • if sys.version_info < (3,):
  •   command.post[0] = command.post[0].decode(sys.stdin.encoding) #.decode('utf8')
    
    create_post(command.post[0], post_date, command.quiet, command.filename)
    Mark as spam Delete 2013-02-02
    micolous
    Another way to handle the slugs is to pipe them through the translit module:
    http://pypi.python.org/pypi/translit/0.2a1

This way you can automatically make ASCII-only slugs for filenames.

Mark as spam Delete 2013-02-04
Vlad Riscutia
Thanks! translit looks great, though this is Python3 only. I can probably merge the two fixes so it works on both version. I'll give it a shot after the next release.

Theme not generated

I am trying to create a tinkerer blog but the theme and _static folders are empty.

I installed it through pip and followed the documentation but I could not get it work. Any idea?

theme.conf - pygments_style has no effect on _static/pygments.css

Create a new theme in _themes/mytheme with the following theme.conf:

[theme]
inherit = boilerplate
stylesheet = flat.css
pygments_style = monokai

[options]
accent_color = #1e73be

The pygments.css file created in blog/html/_static always has the same checksum (59c2fb442ec1a385b706c40ed7f59315) no matter what the pygments_style variable is defined to in theme.conf.

Changing accent_color has the desired effect after tinker -b so the theme is being picked up correctly.

An strace tinker -b shows that the correct pgyment's style file is being opened from site-packages/pygments/styles (changing the style makes different files to be opened, so the code seems to be picking up the variable value but the final .css file does not have the correct parameters for that style).

feature: make all images clickable?

Using tinkerer for my website/blog I found that it is often nice to show images on smaller scales (for example screenshots), but if you click on the image, they will be shown full size, and you just go back to the page containing the image.
I think that is the way how Wordpress handles images in blog posts.

Question: would this be an option for tinkerer too?

Add Open Graph meta tags

Links posted to Facebook don't look that great since generated HTML is missing Open Graph tags.

Error when updating translation files

I forked this project and made the string "Leave a comment" in tinkerer.ext.disqus.get_count() translatable by replacing it with a new UIStr.LEAVE_A_COMMENT.

Then I updated the tinkerer/ext/locale/tinkerer.pot by running python ./setup.py extract_messages.

But when I tried to update the catalogs by running python ./setup.py update_catalog I got an error:

/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'test_requires'
  warnings.warn(msg)
running update_catalog
updating catalog 'tinkerer/ext/locale/ca/LC_MESSAGES/tinkerer.po' based on 'tinkerer/ext/locale/tinkerer.pot'
updating catalog 'tinkerer/ext/locale/de/LC_MESSAGES/tinkerer.po' based on 'tinkerer/ext/locale/tinkerer.pot'
updating catalog 'tinkerer/ext/locale/en_GB/LC_MESSAGES/tinkerer.po' based on 'tinkerer/ext/locale/tinkerer.pot'
updating catalog 'tinkerer/ext/locale/es/LC_MESSAGES/tinkerer.po' based on 'tinkerer/ext/locale/tinkerer.pot'
updating catalog 'tinkerer/ext/locale/fr/LC_MESSAGES/tinkerer.po' based on 'tinkerer/ext/locale/tinkerer.pot'
updating catalog 'tinkerer/ext/locale/ja/LC_MESSAGES/tinkerer.po' based on 'tinkerer/ext/locale/tinkerer.pot'
updating catalog 'tinkerer/ext/locale/pl/LC_MESSAGES/tinkerer.po' based on 'tinkerer/ext/locale/tinkerer.pot'
updating catalog 'tinkerer/ext/locale/pt_BR/LC_MESSAGES/tinkerer.po' based on 'tinkerer/ext/locale/tinkerer.pot'
Traceback (most recent call last):
  File "./setup.py", line 70, in <module>
    'extract_messages': '$._, jQuery._',
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/Users/mbaechtold/Code/Virtualenvs/tinkerer/lib/python2.7/site-packages/babel/messages/frontend.py", line 557, in run
    catalog = read_po(infile, locale=locale, domain=domain)
  File "/Users/mbaechtold/Code/Virtualenvs/tinkerer/lib/python2.7/site-packages/babel/messages/pofile.py", line 200, in read_po
    _add_message()
  File "/Users/mbaechtold/Code/Virtualenvs/tinkerer/lib/python2.7/site-packages/babel/messages/pofile.py", line 160, in _add_message
    catalog[msgid] = message
  File "/Users/mbaechtold/Code/Virtualenvs/tinkerer/lib/python2.7/site-packages/babel/messages/catalog.py", line 594, in __setitem__
    self.mime_headers = headers.items()
  File "/Users/mbaechtold/Code/Virtualenvs/tinkerer/lib/python2.7/site-packages/babel/messages/catalog.py", line 380, in _set_mime_headers
    value, tzoffset, _ = re.split('([+-]\d{4})$', value, 1)
ValueError: need more than 1 value to unpack

I havent used Babel before so maybe I'm running the wrong command?

questions about formatting blog taglines

  1. Is it possible to get line breaks, bold/italic/underline, etc. in a blog's tagline by editing the tagline string in conf.py? I've tried using rst syntax, and also inserting raw html, and even thrown it the \n control character to see what would happen, but none of these attempts have worked.

  2. If it's currently impossible to get basic formatting in taglines, is this a feature that you'd like to have in Tinkerer eventually? As a Tinkerer user, I would personally like to have more flexibility in formatting my blog's tagline, but I understand that you as a developer might have some compelling reason why it would be problematic.

  3. If you would like tagline formatting to be implemented, would it be better to have the tagline string rendered from reStructuredText, or injected as raw HTML?

Thanks!

CSS: Ending postmeta div too close to code blocks (hightlight-* div)

If the ending element of a post is a highlighted code block, i.e. <div class="highlight-shell-session">, the postmeta div will be too close to it with no margin. The below is the screenshot. You may also take a look at source page: http://blog.shichao-an.info/blog/html/2014/10/01/setup_virtualenvwrapper_with_pyenv_using_pyenv_virtualenvwrapper.html

screenshot 2014-10-01 18 27 03

If adding top margin to postmeta div, the title area which is included in postmeta div, will be affected.

Use tinkerer for a site (not a blog)

IMHO, will be nice if can use tinkerer for write a site and not a blog. Do it must be "easy" since:

  • a blog must have a post in master.rst and
  • a site must have none post in master.rst and a page named index.rst or home.rst.

For the above part I can write a patch. But I can't figure it out how to stop tinkerer stop try to generate the blog home page, any help?

Ability to correctly display ipython notebooks in posts

I know that you can dump notebooks to rst, but that displays poorly.

It WORKS, but it would be better if they actually looked like the output from a notebook.

Example from pelican: http://themodernscientist.com/posts/2013/2013-06-14-visualization_of_nmr_shaped_pulses/

The plug in that does this for pelican is here: https://github.com/jakevdp/pelican-plugins/blob/liquid_tags/liquid_tags/notebook.py

I would love to write this myself and be able to have contributed in a real way to this project but I am in the middle of writing my PhD dissertation and a paper and ad nauseum.

Anyway, that's a request that I would LOVE to see added to tinkerer in case any of you folks have the time and interest.

Gus

Absolute internal URLs should be patched in RSS feed

Links like "/_static/foo.resource" are not patched at all.
They SHOULD NOT be patched on aggregated pages, as website absolute paths should work fine there but they SHOULD be patched on the RSS feed by prepending website URL to them.

Some information not translated

When try to use other language that not english some information are keep in english. A full list of the information that should be translate and aren't can be found below:

  • Months.

Tag & Category Feeds

I want to have different RSS feeds for tags and categories. This might be a sphinx plugin, or two. I'd like to give it a try if you'd consider merging this feature.

how to fix ERROR: Content block expected for the "raw" directive; none found.?

hi.

as3:/tinkerer-site# nano /root/tinkerer-site/2013/12/09/fengyuwuzu.rst
as3:
/tinkerer-site# cat /root/tinkerer-site/2013/12/09/fengyuwuzu.rst

风雨无阻

.. author:: default
.. categories:: none
.. tags:: none
.. comments::

.. raw:: html

as3:/tinkerer-site#
as3:
/tinkerer-site# tinker --build
Making output directory...
Running Sphinx v1.1.3
loading pickled environment... not yet created
building [html]: targets for 6 source files that are out of date
updating environment: 6 added, 0 changed, 0 removed
reading sources... [100%] master
/root/tinkerer-site/2013/12/09/fengyuwuzu.rst:11: ERROR: Content block expected for the "raw" directive; none found.
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] master
writing additional files... search
copying static files... done
dumping search index... done
dumping object inventory... done
build succeeded, 1 warning.
as3:~/tinkerer-site#

submodule

This is possibly related to #90 .
I'm currently trying to have a main repository with the tinkerer files in it and a submodule for blog/html .
The problem with this approach is, that tinker --build removes the whole dir and rewrites it, which causes in loose of the .git files.

Regards,
Lukas

more complete message file for german included (tinkerer.mo)

Hi!

Below is the source for a more complete german localization if the message file in locale/de/LC_MESSAGES. Please use it as you like it.

msgid ""
msgstr ""
"Project-Id-Version: Tinkerer 0.4b\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2012-08-18 20:13+0100\n"
"PO-Revision-Date: 2012-08-18 20:20+0100\n"
"Last-Translator: FULL NAME EMAIL@ADDRESS\n"
"Language-Team: de [email protected]\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 0.9.6\n"
"X-Language: de_DE\n"
"X-Source-Language: en_US\n"

msgid "%B %d, %Y"
msgstr "%d. %B %Y"

msgid "© Copyright %(copyright)s."
msgstr "© Copyright %(copyright)s."

msgid "© Copyright %(copyright)s. "
msgstr "© Copyright %(copyright)s. "

msgid "About these documents"
msgstr "Über diese Dokumente"

msgid "Blog Archive"
msgstr "Archiv"

msgid "Categories"
msgstr "Kategorien"

msgid "Copyright"
msgstr "Copyright"

msgid "Filed under"
msgstr "Kategorien"

msgid "Filed under <span class="title_category">%s"
msgstr "Artikel mit Kategorie: <span class="title_category">%s"

msgid ""
"From here you can search these documents. Enter your search\n"
" words into the box below and click "search". Note that the search\n"
" function will automatically search for all of the words. Pages\n"
" containing fewer words won't appear in the result list."
msgstr ""
"From here you can search these documents. Enter your search\n"
" words into the box below and click "search". Note that the search\n"
" function will automatically search for all of the words. Pages\n"
" containing fewer words won't appear in the result list."

msgid "Hide Search Matches"
msgstr "Fundstellen verbergen"

msgid "Home"
msgstr "Startseite"

msgid "Index"
msgstr "Index"

msgid "Javascript must be enabled to see this e-mail address"
msgstr "Um diese E-Mail-Adresse zu sehen, muss Javascript aktiviert sein"

msgid "Newer"
msgstr "Früher"

msgid "Older"
msgstr "Später"

msgid "Page %d"
msgstr "Seite %d"

msgid "Permalink to this definition"
msgstr "Permalink zu dieser Definition "

msgid "Permalink to this headline"
msgstr "Permalink zu dieser Überschrift"

msgid ""
"Please activate JavaScript to enable the search\n"
" functionality."
msgstr ""
"Bitte aktivieren Sie JavaScript, um die Suchfunktion\n"
" zu nutzen."

msgid "Posted by"
msgstr "Von"

msgid "Posts tagged with <span class="title_tag">%s"
msgstr "Artikel mit Schlagwort: <span class="title_tag">%s"

msgid "Read more..."
msgstr "Weiter lesen..."

msgid "Recent Posts"
msgstr "Aktuell"

msgid "Search"
msgstr "Suche"

msgid "Search Results"
msgstr "Suchergebnisse"

msgid "Search within %(docstitle)s"
msgstr "Suche innerhalb %(docstitle)s"

msgid "Tags"
msgstr "Schlagwörter"

msgid "Tags Cloud"
msgstr "Tags Cloud"

msgid "Your search did not match any results."
msgstr "Die Suche hat nichts gefunden."

msgid "search"
msgstr "suchen"

Embedded videos break tinkerer

When I embed an iframe video (youtube, vimeo, etc) I get a strange bug where my entire website will build just fine until it gets to the video and no content after the video will be built. Is this a known issue?

Info:

(tinkerSite)$ tinker --version
Tinkerer version 1.5
(tinkerSite)$ python --version
Python 3.4.2
(tinkerSite)$ pip freeze
You are using pip version 6.0.6, however version 6.0.8 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Babel==1.3
cssselect==0.9.1
docutils==0.12
httplib2==0.9
Jinja2==2.7.3
lxml==3.4.1
MarkupSafe==0.23
Pygments==2.0.1
pyquery==1.2.9
pytz==2014.10
Sphinx==1.2.3
Tinkerer==1.5

Code:

Title
=====                                                

Content                                                                        

.. raw:: html                                                                      

    <iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/ybJ5DiHT0NM" frameborder="0" allowfullscreen></iframe>

More content <-- This does not load at all, nor do any following posts

I have talked with a friend of mine and they do not get the error. I may have a weird config but I don't suspect that should cause problems since I'm mostly using the defaults.

If I'm doing something wrong we should update the documentation because I can't find anything to answer my question.

Angular Js showColumnMenu

I am new to angular js and i am using ng grid but i am facing one problem. I am using "showColumnMenu" for configuring ng grid columns but additionally I want to allow user to Change the Column Name from this menu. Like If By default column name is "Name" and user wants to change it to "Full Name" then he can do this from "showColumnMenu".

Any help how can I achieve this.

Any help will be appreciated.

Thanks

Use of strftime in utils.py

Should not rely on strftime to extract timestamp from string in utils.py, rather use a locale-agnostic API since format should always be yyyy/MM/dd

Also move the image files when the post be moved?

The --post, --date, --draft, --preview command option all ignore the images, so I need to do it manually.
Almost all my post has some pictures...

I think it should be automatically, but it is possible?

Empty tag URLs

Copy/paste from bitbucket issue tracker:

Christian Jann created an issue 2013-02-08

</section><section><div class="widget">
    <h1>Tags Cloud</h1>
      <a href="tags/.html" style="font-size: 8pt"></a>&nbsp;&nbsp;
      <a href="tags/3g.html" style="font-size: 8pt">3G</a>&nbsp;&nbsp;

I have not yet searched the reason.

Comments (5)
Vlad Riscutia
assigned issue to Vlad Riscutia
2013-02-15
Christian Jann
Found the reason by accident when editing a post:
.. tags:: TagA, TagB, TagC,
There was a comma too mush. I dunno if we want to check for empty tags and then skip them?

Mark as spam Delete 2013-02-17
Vlad Riscutia
I figured that could be the issue. Yeah, we probably want to add a check for empty tags.
Edit Mark as spam Delete 2013-02-17
Christian Jann
O.K. thank you, this bug has very low priority but it is a good idea to leave it open, just as a reminder that there is something that could be improved. We could also print a warning and the filename where the empty tag/category comes from like Sphinx does for syntax errors and bad formatted tables.
Mark as spam Delete 2013-02-17
Vlad Riscutia
I completely agree. It is a legitimate issue and Tinkerer should, at the least, treat empty tag like it treats 'none' string. Printing a warning would be even better. Will look at if after next release.

Failed when loading pickled environment

Sphinx failed when try to load pickled environment.

$ tinker -b
Making output directory...
Running Sphinx v1.3a0
loading translations [pt_BR]... done
loading pickled environment... failed: [Errno 2] No such file or directory: '/home/raniere/public/blog/blog/doctrees/environment.pickle'

PyQuery implementation of make_read_more_link() is not always working

If the <div id="more"> is enclosed by <div id="some-other-div"> then doc('p.readmorewrapper').next_all().remove() will not remove everything that should be removed. Sometimes it works, sometimes not, it depends where the .. more:: gets inserted.

Example:

make_read_more_link:

def make_read_more_link(body, docpath, docname):
    """
    Create "read more" link if marker exists.
    """
    doc = pyquery.PyQuery(body)
    link_p = ('<p class="readmorewrapper"><a class="readmore" '
              'href="%s.html#more">%s</a></p>' %
              (docpath + docname, UIStr.READ_MORE))
    doc('div#more').replaceWith(link_p)
    doc('p.readmorewrapper').next_all().remove()
    return doc.html()

body:

<h1>Example</h1>
<div class="figure align-center">
</div>
<p>....</p>
<p>Why?</p>

<div id="some-other-div">

Text...

<div id="more"> </div>

</div>

<p>more text</p>

<p>...</p>

</div>

IPython session:

In [19]: body='''
<h1>Example</h1>
<div class="figure align-center">
</div>
<p>....</p>
<p>Why?</p>
<div id="some-other-div">
Text...
<div id="more"> </div>
</div>
<p>more text</p>
<p>...</p>
</div>
'''

In [20]: doc = pyquery.PyQuery(body)

In [21]: link_p = ('<p class="readmorewrapper"><a class="readmore" '
   ....:                 'href="%s.html#more">%s</a></p>' %
   ....:                 ("/index.html", "READ_MORE"))

In [22]: doc('div#more').replaceWith(link_p)
Out[22]: [<div#more>]

In [23]: doc('p.readmorewrapper').next_all().remove()
Out[23]: []

In [24]: doc.html()
Out[24]: u'<h1>Example</h1>\n
<div class="figure align-center">\n
</div>\n
<p>....</p>\n
<p>Why?</p>\n
<div id="some-other-div">\n
Text...\n
<p class="readmorewrapper"><a class="readmore" href="/index.html.html#more">READ_MORE</a></p>\n
</div>\n
<p>more text</p>\n
<p>...</p>\n\n'

In [25]: 

<p>more text</p>... should have been removed.

I'm currently investigating solutions... But maybe @dhellmann has a good idea?

Problem after #28 in Windows

After #28, I got following error.

My environment is language not set in conf.py , Windows 8.1, not defined language related environment variable like LANG, LC_*.
In this case, babel Locale.defaut() return null.

Currently, I presume the latter and fall back to the “default” (i.e. system) locale, if app.config.language is None.
#28 (comment)

I think fall back to English is better.

>tinker -b
Making output directory...
Running Sphinx v1.2b3
loading pickled environment... not yet created
building [html]: targets for 9 source files that are out of date
updating environment: 9 added, 0 changed, 0 removed
reading sources... [ 11%] 2012/12/08/blobasyncinside

Exception occurred:
  File "C:\opt\Sphinx\python\lib\site-packages\tinkerer-1.2.1-py2.7.egg\tinkerer\ext\metadata.py", line 85, in get_metadata
    locale = Locale.parse(language) if language else Locale()
TypeError: __init__() takes at least 2 arguments (1 given)
The full traceback has been saved in c:\users\takekazu\appdata\local\temp\sphinx-err-fzjj8v.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
Either send bugs to the mailing list at <http://groups.google.com/group/sphinx-users/>,
or report them in the tracker at <http://bitbucket.org/birkenfeld/sphinx/issues/>. Thanks!

c:\users\takekazu\appdata\local\temp\sphinx-err-fzjj8v.log

# Sphinx version: 1.2b3
# Python version: 2.7.5
# Docutils version: 0.11 release
# Jinja2 version: 2.7.1
# Loaded extensions:
#   tinkerer.ext.disqus from C:\opt\Sphinx\python\lib\site-packages\tinkerer-1.2.1-py2.7.egg\tinkerer\ext\disqus.pyc
#   tinkerer.ext.blog from C:\opt\Sphinx\python\lib\site-packages\tinkerer-1.2.1-py2.7.egg\tinkerer\ext\blog.pyc
#   sphinx.ext.oldcmarkup from C:\opt\Sphinx\python\lib\site-packages\sphinx-1.2b3-py2.7.egg\sphinx\ext\oldcmarkup.pyc
#   sphinxcontrib.gist from C:\opt\Sphinx\python\lib\site-packages\sphinxcontrib.gist-0.1.0-py2.7.egg\sphinxcontrib\gist\__init__.pyc
Traceback (most recent call last):
  File "C:\opt\Sphinx\python\lib\site-packages\sphinx-1.2b3-py2.7.egg\sphinx\cmdline.py", line 246, in main
    app.build(force_all, filenames)
  File "C:\opt\Sphinx\python\lib\site-packages\sphinx-1.2b3-py2.7.egg\sphinx\application.py", line 212, in build
    self.builder.build_update()
  File "C:\opt\Sphinx\python\lib\site-packages\sphinx-1.2b3-py2.7.egg\sphinx\builders\__init__.py", line 214, in build_update
    'out of date' % len(to_build))
  File "C:\opt\Sphinx\python\lib\site-packages\sphinx-1.2b3-py2.7.egg\sphinx\builders\__init__.py", line 234, in build
    purple, length):
  File "C:\opt\Sphinx\python\lib\site-packages\sphinx-1.2b3-py2.7.egg\sphinx\builders\__init__.py", line 134, in status_iterator
    for item in iterable:
  File "C:\opt\Sphinx\python\lib\site-packages\sphinx-1.2b3-py2.7.egg\sphinx\environment.py", line 470, in update_generator
    self.read_doc(docname, app=app)
  File "C:\opt\Sphinx\python\lib\site-packages\sphinx-1.2b3-py2.7.egg\sphinx\environment.py", line 618, in read_doc
    pub.publish()
  File "C:\opt\Sphinx\python\lib\site-packages\docutils-0.11-py2.7.egg\docutils\core.py", line 217, in publish
    self.settings)
  File "C:\opt\Sphinx\python\lib\site-packages\docutils-0.11-py2.7.egg\docutils\readers\__init__.py", line 71, in read
    self.input = self.source.read()
  File "C:\opt\Sphinx\python\lib\site-packages\sphinx-1.2b3-py2.7.egg\sphinx\environment.py", line 600, in read
    app.emit('source-read', docname, arg)
  File "C:\opt\Sphinx\python\lib\site-packages\sphinx-1.2b3-py2.7.egg\sphinx\application.py", line 358, in emit
    results.append(callback(self, *args))
  File "C:\opt\Sphinx\python\lib\site-packages\tinkerer-1.2.1-py2.7.egg\tinkerer\ext\blog.py", line 61, in source_read
    metadata.get_metadata(app, docname)
  File "C:\opt\Sphinx\python\lib\site-packages\tinkerer-1.2.1-py2.7.egg\tinkerer\ext\metadata.py", line 85, in get_metadata
    locale = Locale.parse(language) if language else Locale()
TypeError: __init__() takes at least 2 arguments (1 given)

raw:: html builds for pages and don't for posts

I tried to insert a youtube video on a post when I found this bug. If I test it on a page under doc/ or pages/, the site builds and the video is embedded. But in a post, the site doesn't build.

writing additional files...
Exception occurred:
File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 223, in parseString
parser.Parse(string, True)
ExpatError: mismatched tag: line 5, column 2

You can experiment this bug with adding a simple raw html code like this one :

.. raw:: html

<div style="margin-top:20px;">
    <hr>
</div>

Search does not work normally against title-related keywords

It seems the search function does not work correctly as I tried to search some keywords. Through repeated tests, I found that search.html failed to return any result against any keyword that is included in "titleterms" of searchindex.js (e.g. "fedora" in http://blog.shichao-an.info/blog/html/searchindex.js). Other content keywords are fine.

You can try that on my site http://blog.shichao-an.info/. I'm not whether it is a Sphinx problem; I open the issue here because another Sphinx-based site of mine works correctly in this case. I not sure what causes this problem.

Sphinx 1.3b breaks stuff

Need to figure out what changed between 1.2 and 1.3. As a work around, installing 1.2.3 explicitly (f0adefc). This needs to be updated though to support newer Sphinx versions.

Exception while building the blog

[hargup  blog  (gh-pages) ]$tinker --build
Making output directory...
Running Sphinx v1.2
loading pickled environment... not yet created
building [html]: targets for 11 source files that are out of date
updating environment: 11 added, 0 changed, 0 removed
reading sources... [100%] master                                                
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] master                                                 
writing additional files...
Exception occurred:
  File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 223, in parseString
    parser.Parse(string, True)
ExpatError: junk after document element: line 8, column 0
The full traceback has been saved in /tmp/sphinx-err-NEFQgD.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
Either send bugs to the mailing list at <http://groups.google.com/group/sphinx-users/>,
or report them in the tracker at <http://bitbucket.org/birkenfeld/sphinx/issues/>. Thanks!

Here's the log file

# Sphinx version: 1.2
# Python version: 2.7.3
# Docutils version: 0.11 release
# Jinja2 version: 2.7.1
# Loaded extensions:
#   tinkerer.ext.disqus from /usr/local/lib/python2.7/dist-packages/tinkerer/ext/disqus.pyc
#   tinkerer.ext.blog from /usr/local/lib/python2.7/dist-packages/tinkerer/ext/blog.pyc
#   sphinx.ext.oldcmarkup from /usr/local/lib/python2.7/dist-packages/sphinx/ext/oldcmarkup.pyc
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/sphinx/cmdline.py", line 246, in main
    app.build(force_all, filenames)
  File "/usr/local/lib/python2.7/dist-packages/sphinx/application.py", line 212, in build
    self.builder.build_update()
  File "/usr/local/lib/python2.7/dist-packages/sphinx/builders/__init__.py", line 214, in build_update
    'out of date' % len(to_build))
  File "/usr/local/lib/python2.7/dist-packages/sphinx/builders/__init__.py", line 273, in build
    self.finish()
  File "/usr/local/lib/python2.7/dist-packages/sphinx/builders/html.py", line 453, in finish
    for pagename, context, template in pagelist:
  File "/usr/local/lib/python2.7/dist-packages/tinkerer/ext/blog.py", line 107, in html_collect_pages
    for name, context, template in collect_additional_pages(app):
  File "/usr/local/lib/python2.7/dist-packages/tinkerer/ext/blog.py", line 86, in collect_additional_pages
    for name, context, template in rss.generate_feed(app):
  File "/usr/local/lib/python2.7/dist-packages/tinkerer/ext/rss.py", line 56, in generate_feed
    replace_read_more_link=not app.config.rss_generate_full_posts)),
  File "/usr/local/lib/python2.7/dist-packages/tinkerer/ext/patch.py", line 106, in patch_links
    doc = xml.dom.minidom.parseString(in_str)
  File "/usr/lib/python2.7/xml/dom/minidom.py", line 1930, in parseString
    return expatbuilder.parseString(string)
  File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 940, in parseString
    return builder.parseString(string)
  File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 223, in parseString
    parser.Parse(string, True)
ExpatError: junk after document element: line 8, column 0

iframe in a raw directive breaks the home page

I'm using

.. raw:: html

   <iframe frameborder="0" width="100%" height="300" src="http://bl.ocks.org/d/dcfe6ce4e7fa7b2e00e9"></iframe>

In a post. The post's own page converts to HTML (--build or --preview) with no problems, but the home page is broken. Everything after the iframe is dropped.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.