aboutsummaryrefslogtreecommitdiff
path: root/local_episodes.pl
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-02-15 15:38:57 +0100
committerJohn Ankarström <john@ankarstrom.se>2022-02-15 15:38:57 +0100
commit09ec144a99f1234a37d04854bdfb81485540be97 (patch)
treece3050a062a76dd12980b08ef36eb7ac35b7e6f8 /local_episodes.pl
parentfed19b9942575e7c0360a0d77a3c544afdbaeb6c (diff)
downloadEpisodeBrowser-09ec144a99f1234a37d04854bdfb81485540be97.tar.gz
Put C code and Prolog code in separate directories.
Diffstat (limited to 'local_episodes.pl')
-rw-r--r--local_episodes.pl31
1 files changed, 0 insertions, 31 deletions
diff --git a/local_episodes.pl b/local_episodes.pl
deleted file mode 100644
index 283ccb7..0000000
--- a/local_episodes.pl
+++ /dev/null
@@ -1,31 +0,0 @@
-:- module(local_episodes, [local_episode//1,
- episode_file/2,
- open_episode/1]).
-
-:- use_module(library(dcg/basics)).
-:- use_module(atom_dcg).
-
-local_episode -->
- local_episode(_).
-local_episode(N) -->
- string(_), "Detective_Conan_-_", integer(N), string(_).
-local_episode(N) -->
- string(_), "Detective_Conan_-_",
- integer(First), "-", integer(Last), string(_),
- { Second is First + 1, between(Second, Last, N) }.
-
-% Find episode on disk.
-
-episode_file(N, F) :-
- expand_file_name('C:/Users/John/Nedladdningar/Detective Conan season 1 to season 22 + season 23(incomplete)/*/*.*',
- F1),
- ( nonvar(N)
- -> include(atom_phrase(local_episode(N)), F1, [F|_])
- ; include(atom_phrase(local_episode), F1, F2),
- member(F, F2),
- atom_phrase(local_episode(N), F)
- ).
-
-open_episode(N) :-
- episode_file(N, F),
- win_shell(open, F).