PASTEBIN
| #1 paste tool since 2002
create new paste
tools
api
archive
real-time
faq
PASTEBIN
create new paste
trending pastes
sign up
login
my settings
my profile
Public Pastes
How do I properly ...
3 sec ago
Untitled
6 sec ago
Untitled
C++ | 7 sec ago
C++: How to get a ...
9 sec ago
Untitled
9 sec ago
Post request by ru...
15 sec ago
Alex Cute - Siterip
41 sec ago
What does this err...
21 sec ago
New Paste
Project: auto songs downloader Abstract: a python program that can scrape various web sites (funmaza.com, apniisp.com, songs.pk) and extract the links of all the songs, sorted by album. it also downloads the files and saves them to appropriate directories. file tags (artist, album) are also set automatically. Basic Design: a two level design: ==> at the first level is a backend that stores the details of the songs and albums. the storage can be in any format, but the interface exported is same for all backend storage formats. thus, a change in internal storage format should not break the application ==> at the second level are various scripts for scrapping the web sites and adding the data to the backend. once the data is added, the files are downloaded, again using the backend interface to get the required info (song name, album, location, already downloaded?) and the backend is updated appropriately. a GUI frontend is also present. it also uses the backend storage to show the data. no component except the backend handles the storage file directly. all requests go through the backend, thus making the system independant of the file format used to store the data. BACKEND API: ************************ BCKEND API START connect_to_file (file_name, callback) # connects to the specified file to get data. if no file exists the callback is called, if it returns the STRING "TRUE" a new file is created # if it returns the STRING "FALSE", action is cancelled. if it returns any other STRING, connect_to_file () is called again with the string as the file_name disconnect_from_file () # disconnects the backend from the file, any further data exchanges are prohibited until a new file is connected to get_albums () # returns a list containing (album_id, album_name) for each album get_downloaded_albums () # return a list containing (album_id, album_name) for each album marked as downloaded get_not_downloaded_albums () # inverse of get_downloaded_albums () get_album_location (album_id) # returns the path of the folder for the album_id get_album_artists (album_id) # returns list of album artists get_songs () # return a list containing (song_id, song_album_id, song_name) for each song get_album_songs (album_id) # returns a list containing (song_id, song_name) for each song from the given album get_downloaded_songs () # returns a list containing (song_id, song_album_id, song_name) for each song marked as downloaded get_not_downloaded_songs () # inverse of get_downloaded_songs () get_song_location (song_id) # returns the complete path (with filename) for the song_id get_song_artists (album_id) # returns list of song artists get_is_album_downloaded (album_id) # returns TRUE if the album_id is marked as downloaded get_is_song_downloaded (song_id) # returns TRUE if the song_id is marked as downloaded set_is_album_downloaded (album_id) # changes the downloaded flag of the album_id set_is_song_downloaded (song_id) # changes the downloaded flag of the song_id add_album (album_name, album_location, downloaded, album_artists) # adds a new album with the provided properties add_song (song_name, song_location, downloaded, song_artists, album_id) # adds a new song with the provided properties delete_album (album_id, from_fs) # deletes the album_id from DB. if from_fs is true, the album_location folder is also deleted delete_song (song_id, from_fs) # deletes the song_id from DB. if from_fs is true, the song_location file is also deleted find_album (album_name) # returns the album with the given album_name (exact case insensitive string match) search_album (name) # return the album(s) with the given album_name (approximate match using Soundex {may change} algorithm) BCKEND API END ************************
Optional Paste Settings
Syntax Highlighting:
None
Bash
C
C#
C++
CSS
HTML
HTML 5
Java
JavaScript
Lua
None
Perl
PHP
Python
Rails
-------------
4CS
6502 ACME Cross Assembler
6502 Kick Assembler
6502 TASM/64TASS
ABAP
ActionScript
ActionScript 3
Ada
ALGOL 68
Apache Log
AppleScript
APT Sources
ASM (NASM)
ASP
autoconf
Autohotkey
AutoIt
Avisynth
Awk
BASCOM AVR
Bash
Basic4GL
BibTeX
Blitz Basic
BNF
BOO
BrainFuck
C
C for Macs
C Intermediate Language
C#
C++
C++ (with QT extensions)
C: Loadrunner
CAD DCL
CAD Lisp
CFDG
ChaiScript
Clojure
Clone C
Clone C++
CMake
COBOL
CoffeeScript
ColdFusion
CSS
Cuesheet
D
DCS
Delphi
Delphi Prism (Oxygene)
Diff
DIV
DOS
DOT
E
ECMAScript
Eiffel
Email
EPC
Erlang
F#
Falcon
FO Language
Formula One
Fortran
FreeBasic
FreeSWITCH
GAMBAS
Game Maker
GDB
Genero
Genie
GetText
Go
Groovy
GwBasic
Haskell
HicEst
HQ9 Plus
HTML
HTML 5
Icon
IDL
INI file
Inno Script
INTERCAL
IO
J
Java
Java 5
JavaScript
jQuery
KiXtart
Latex
Liberty BASIC
Linden Scripting
Lisp
LLVM
Loco Basic
Logtalk
LOL Code
Lotus Formulas
Lotus Script
LScript
Lua
M68000 Assembler
MagikSF
Make
MapBasic
MatLab
mIRC
MIX Assembler
Modula 2
Modula 3
Motorola 68000 HiSoft Dev
MPASM
MXML
MySQL
newLISP
None
NullSoft Installer
Oberon 2
Objeck Programming Langua
Objective C
OCalm Brief
OCaml
OpenBSD PACKET FILTER
OpenGL Shading
Openoffice BASIC
Oracle 11
Oracle 8
Oz
Pascal
PAWN
PCRE
Per
Perl
Perl 6
PHP
PHP Brief
Pic 16
Pike
Pixel Bender
PL/SQL
PostgreSQL
POV-Ray
Power Shell
PowerBuilder
ProFTPd
Progress
Prolog
Properties
ProvideX
PureBasic
PyCon
Python
q/kdb+
QBasic
R
Rails
REBOL
REG
Robots
RPM Spec
Ruby
Ruby Gnuplot
SAS
Scala
Scheme
Scilab
SdlBasic
Smalltalk
Smarty
SQL
SystemVerilog
T-SQL
TCL
Tera Term
thinBasic
TypoScript
Unicon
UnrealScript
Vala
VB.NET
VeriLog
VHDL
VIM
Visual Pro Log
VisualBasic
VisualFoxPro
WhiteSpace
WHOIS
Winbatch
XBasic
XML
Xorg Config
XPP
YAML
Z80 Assembler
ZXBasic
Paste Expiration:
Never
10 Minutes
1 Hour
1 Day
1 Month
Paste Exposure:
Public
Unlisted
Private (members only)
Paste Name / Title:
Hello
Guest
Sign Up
or
Login
You are currently not logged in, this means you can not edit or delete anything you paste.
Sign Up
or
Login