Not logged in. · Lost password · Register
Forum: General Help and Support General Stuff RSS
page for my movie list
Avatar
RyGy7 #1
Member since Mar 2015 · 8 posts
Group memberships: Members
Show profile · Link to this post
Subject: page for my movie list
I can't export my list of movies to a .txt file, i want to do 2 things and looking for suggestions.

1 - easiest way to have that as an un-ordered list on a wiki page.

2 - automate this job weekly.  (first half i've got with powershell and windows task scheduler, but what about wiki?)

thanks for the ideas
Avatar
LarsDW223 #2
Member since Sep 2014 · 170 posts
Group memberships: Members
Show profile · Link to this post
Regarding text export:
Did you have a look at https://www.dokuwiki.org/plugin:text?

Regards,
Lars
Avatar
RyGy7 #3
Member since Mar 2015 · 8 posts
Group memberships: Members
Show profile · Link to this post
Quote by LarsDW223:
Regarding text export:
Did you have a look at https://www.dokuwiki.org/plugin:text?

Regards,
Lars

woops i just realized i have a typo in the OP.  I CAN export my movies to a .txt file, what i want to do is automate that into my dokuwiki page of movies so i maintain a list i can reference easily.    My bad on that.
Avatar
turnermm (Moderator) #4
Member since Oct 2009 · 3896 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
<?php
#movies.php

if($argc > 1) {
  $movie_file = $argv[1];
}
else $movie_file = "movies.txt";

$data = file($movie_file,FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES);
foreach ($data as $movie) {
echo "    *" . $movie . "\n";
}

Run this from the command line:
    php movies.php  path_to_movies_list > output_page
If no path to the movies list is give, then the script uses movies.txt, assumed to be in the same directory as the script.
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2017-11-22, 06:42:44 (UTC +01:00)