Save to file

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Save to file

Damien Cassou
Hi,

I would like to make Pier Book save everything to files (one per
chapter for example) so that I can use a DVCS to version control the
book and allow authors to write with their preferred text editors if
they want to.

What is already there? What needs to be done?

Thank you

--
Damien Cassou
http://damiencassou.seasidehosting.st

"Lambdas are relegated to relative obscurity until Java makes them
popular by not having them." James Iry
_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Save to file

Lukas Renggli
You could use the following script from a cron job. The only thing
missing is the commit to your version control system:

#!/bin/sh

# properties
BASE="http://book.seaside.st/book"
URL="$BASE?view=BOZipView"

# fetch latex
echo "Downloading LaTeX ..."
curl --silent --output "archive.zip" "$URL"
unzip -u -d latex -o archive.zip
rm -f archive.zip

# get wiki stuff
echo "Downloading Wiki ..."
rm -rf wiki
for FILE in `grep '% /book/' latex/book.tex | sed 's/% \/book\/\(.*\)/\1/'` ; do
   mkdir -p "wiki/`dirname $FILE`"
   curl --silent --output "wiki/$FILE.txt" "$BASE/$FILE?view=PRWikiView"
done


On 31 August 2012 19:35, Damien Cassou <[hidden email]> wrote:

> Hi,
>
> I would like to make Pier Book save everything to files (one per
> chapter for example) so that I can use a DVCS to version control the
> book and allow authors to write with their preferred text editors if
> they want to.
>
> What is already there? What needs to be done?
>
> Thank you
>
> --
> Damien Cassou
> http://damiencassou.seasidehosting.st
>
> "Lambdas are relegated to relative obscurity until Java makes them
> popular by not having them." James Iry
> _______________________________________________
> Magritte, Pier and Related Tools ...
> https://www.iam.unibe.ch/mailman/listinfo/smallwiki



--
Lukas Renggli
www.lukas-renggli.ch
_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Save to file

Damien Cassou
On Fri, Aug 31, 2012 at 7:55 PM, Lukas Renggli <[hidden email]> wrote:
> You could use the following script from a cron job.

thank you for the script. But this is 1-way only. Changes made by
authors on git won't be reflected on Pier Book as far as I can tell.

--
Damien Cassou
http://damiencassou.seasidehosting.st

"Lambdas are relegated to relative obscurity until Java makes them
popular by not having them." James Iry
_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki