A user account is required in order to edit this wiki, but we've had to disable public user registrations due to spam.

To request an account, ask an autoconfirmed user on Chat (such as one of these permanent autoconfirmed members).

Anolis: Difference between revisions

From WHATWG Wiki
Jump to navigation Jump to search
No edit summary
 
(8 intermediate revisions by 4 users not shown)
Line 1: Line 1:
'''Anolis is no longer maintained. Please use [https://github.com/tabatkins/bikeshed/ bikeshed] instead.'''
Anolis is a tool to generate specification-like documents out of simple HTML.
Anolis is a tool to generate specification-like documents out of simple HTML.


* http://pimpmyspec.net/
* http://pimpmyspec.net/
* http://hg.hoppipolla.co.uk/ -- jgraham's work
* http://hg.hoppipolla.co.uk/ -- jgraham's work
* http://bitbucket.org/ms2ger/anolis -- will hopefully be merged into jgraham's work
* http://bitbucket.org/ms2ger/anolis -- used by most WHATWG standards, the latest version


== Setting up Anolis with cross-specification cross-references ==
== Setting up ms2ger/anolis ==


* Install http://bitbucket.org/ms2ger/anolis:
* Install http://bitbucket.org/ms2ger/anolis:
Line 14: Line 16:
  sudo port install py27-lxml
  sudo port install py27-lxml
  sudo apt-get install python-lxml
  sudo apt-get install python-lxml
brew install libxml
* install cssselect using whatever package manager is appropriate for your OS/environment; for example, one of the following:
sudo easy_install cssselect
sudo port install py27-cssselect
sudo apt-get install python-cssselect
* install html5lib:
* install html5lib:
  hg clone https://code.google.com/p/html5lib
  sudo easy_install html5lib
cd html5lib/python && sudo python setup.py install
 
* In the directory where you have your specification clone https://bitbucket.org/ms2ger/specification-data as "data"
== Troubleshooting ==
cd /mirror/hg/dvcs.w3.org/fullscreen/ # or wherever your spec is locally
 
hg clone https://bitbucket.org/ms2ger/specification-data data
=== No targets specified ===
* In the same directory create a Makefile equivalent to http://dvcs.w3.org/hg/progress/raw-file/tip/Makefile
If you try to "make" and get a message like:<pre>make: *** No targets specified and no makefile found.  Stop.</pre>
Then you're likely trying to do a <kbd>make</kbd> in the wrong directory.
 
Solution:
# Change your current directory to the parent of the item you're trying to make,
# Verify that there is a "Makefile" in that directory,
# Try again
 
=== No rule to make xref ===
If you try to "make" and get a message like:<pre>make: *** No rule to make target `../xref', needed by `Overview.html'.  Stop.</pre>
Then you're likely missing the "xref" repository.
 
Solution:
# Clone the "xref" repository into a directory that is a sibling of the directory you're working in.
# Try again
 
=== No such option xref ===
If you try to "make" and get a message like:<pre>anolis: error: no such option: --xref</pre>
Then your Anolis is likely out of date.
 
Solution:
# Update your Anolis respository
# Update your install of the "anolis" tool, e.g. in "/usr/local/bin/anolis"
# Try again
 
=== No module named lxml ===
If you try to "make" and get a message like:<pre>ImportError: No module named lxml</pre>
Then you're missing the lxml library.
 
Solution:
# Install lxml per the above instructions, e.g. <kbd><pre> sudo easy_install lxml</pre></kbd>
# Try again
 
=== Connection reset by peer ===
If you're trying to install lxml and get an error message like:
<pre>Downloading http://lxml.de/files/lxml-3.1.2.tgz
error: Connection reset by peer</pre>
Then the network you're on may be problematic.
 
Solution:
# Switch to a different network (e.g. a mifi)
# Try again
 
=== TypeError Item in from list not a string ===
If you try to "make" and get messages like:
<pre>
Traceback (most recent call last):
  File "/usr/local/bin/anolis", line 325, in <module>
    main()
  File "/usr/local/bin/anolis", line 69, in main
    tree = generator.fromFile(input, **kwargs)
  File "/Library/Python/2.7/site-packages/anolislib/generator.py", line 90, in fromFile
    process(tree, processes, **kwargs)
  File "/Library/Python/2.7/site-packages/anolislib/generator.py", line 38, in process
    locals(), [process], -1),
TypeError: Item in ``from list'' not a string
make: *** [Overview.html] Error 1
</pre>
Then ... (no idea)
 
Solution:
* TBD
 
Workaround:
# Give up on locally installed Anolis
# Commit your Overview.src.html as is, noting in the commit message that the Overview.html was not updated
# Use the http://anolis.hoppipolla.co.uk/aquarium.py web service
# Submit the raw.github.com "raw file" URL of the Overview.src.html you just committed
# Save the result over the Overview.html in the same directory as the Overview.src.html
# Commit it with message "sync with Overview.src.html - used anolis.hoppipolla.co.uk/aquarium.py"
 


[[Category:Spec coordination]]
[[Category:Spec coordination]]

Latest revision as of 09:51, 25 February 2016

Anolis is no longer maintained. Please use bikeshed instead.

Anolis is a tool to generate specification-like documents out of simple HTML.

Setting up ms2ger/anolis

hg clone http://bitbucket.org/ms2ger/anolis
cd anolis && sudo python setup.py install
  • install lxml using whatever package manager is appropriate for your OS/environment; for example, one of the following:
sudo easy_install lxml
sudo port install py27-lxml
sudo apt-get install python-lxml
brew install libxml
  • install cssselect using whatever package manager is appropriate for your OS/environment; for example, one of the following:
sudo easy_install cssselect
sudo port install py27-cssselect
sudo apt-get install python-cssselect
  • install html5lib:
sudo easy_install html5lib

Troubleshooting

No targets specified

If you try to "make" and get a message like:

make: *** No targets specified and no makefile found.  Stop.

Then you're likely trying to do a make in the wrong directory.

Solution:

  1. Change your current directory to the parent of the item you're trying to make,
  2. Verify that there is a "Makefile" in that directory,
  3. Try again

No rule to make xref

If you try to "make" and get a message like:

make: *** No rule to make target `../xref', needed by `Overview.html'.  Stop.

Then you're likely missing the "xref" repository.

Solution:

  1. Clone the "xref" repository into a directory that is a sibling of the directory you're working in.
  2. Try again

No such option xref

If you try to "make" and get a message like:

anolis: error: no such option: --xref

Then your Anolis is likely out of date.

Solution:

  1. Update your Anolis respository
  2. Update your install of the "anolis" tool, e.g. in "/usr/local/bin/anolis"
  3. Try again

No module named lxml

If you try to "make" and get a message like:

ImportError: No module named lxml

Then you're missing the lxml library.

Solution:

  1. Install lxml per the above instructions, e.g.
     sudo easy_install lxml
  2. Try again

Connection reset by peer

If you're trying to install lxml and get an error message like:

Downloading http://lxml.de/files/lxml-3.1.2.tgz
error: Connection reset by peer

Then the network you're on may be problematic.

Solution:

  1. Switch to a different network (e.g. a mifi)
  2. Try again

TypeError Item in from list not a string

If you try to "make" and get messages like:

Traceback (most recent call last):
  File "/usr/local/bin/anolis", line 325, in <module>
    main()
  File "/usr/local/bin/anolis", line 69, in main
    tree = generator.fromFile(input, **kwargs)
  File "/Library/Python/2.7/site-packages/anolislib/generator.py", line 90, in fromFile
    process(tree, processes, **kwargs)
  File "/Library/Python/2.7/site-packages/anolislib/generator.py", line 38, in process
    locals(), [process], -1),
TypeError: Item in ``from list'' not a string
make: *** [Overview.html] Error 1

Then ... (no idea)

Solution:

  • TBD

Workaround:

  1. Give up on locally installed Anolis
  2. Commit your Overview.src.html as is, noting in the commit message that the Overview.html was not updated
  3. Use the http://anolis.hoppipolla.co.uk/aquarium.py web service
  4. Submit the raw.github.com "raw file" URL of the Overview.src.html you just committed
  5. Save the result over the Overview.html in the same directory as the Overview.src.html
  6. Commit it with message "sync with Overview.src.html - used anolis.hoppipolla.co.uk/aquarium.py"