diff --git a/ankiqt/ui/main.py b/ankiqt/ui/main.py index 002a59d02..79ec133e2 100755 --- a/ankiqt/ui/main.py +++ b/ankiqt/ui/main.py @@ -2238,6 +2238,7 @@ it to your friends. self.connect(m.actionDonate, s, self.onDonate) self.connect(m.actionRecordNoiseProfile, s, self.onRecordNoiseProfile) self.connect(m.actionBuryFact, s, self.onBuryFact) + self.connect(m.actionExportOriginalFiles, s, self.onExportOriginal) def enableDeckMenuItems(self, enabled=True): "setEnabled deck-related items." @@ -2681,11 +2682,10 @@ Consider backing up your media directory first.""")) ui.utils.showInfo(_("No media URLs defined for this deck."), help="MediaSupport") return - ui.utils.showInfo(ngettext("%d missing file found.
", - "%d missing files found.
", - res[0]) + - _("%d successfully retrieved.") - % res[1], parent=self) + ui.utils.showInfo(ngettext("%d missing file found.
", + "%d missing files found.
", res[0]) + + _("%d successfully retrieved.") + % res[1], parent=self) def addHook(self, *args): addHook(*args) @@ -2696,6 +2696,11 @@ Consider backing up your media directory first.""")) def onUncacheLatex(self): anki.latex.deleteAllLatexImages(self.deck) + def onExportOriginal(self): + cnt = anki.media.exportOriginalFiles(self.deck) + ui.utils.showInfo(_("%(a)d files exported to %(b)s.originals folder") % + {'a': cnt, 'b': self.deck.name()}) + # System specific misc ########################################################################## diff --git a/designer/main.ui b/designer/main.ui index 075880b5f..8f7c11722 100644 --- a/designer/main.ui +++ b/designer/main.ui @@ -1,197 +1,196 @@ - - + MainWindow - - + + 0 0 - 538 - 537 + 550 + 563 - - + + 0 0 - + Anki - - + + :/icons/anki.png:/icons/anki.png - - - + + + 1 1 - + true - - + + 0 - + 0 - - + + true - + QFrame::NoFrame - + QFrame::Raised - - + + 0 - + 0 - - + + - - - + + + 0 0 0 - - - + + + 255 253 215 - - - + + + 255 255 255 - - - + + + 255 254 235 - - - + + + 127 126 107 - - - + + + 170 169 143 - - - + + + 0 0 0 - - - + + + 255 255 255 - - - + + + 0 0 0 - - - + + + 255 255 255 - - - + + + 255 253 215 - - - + + + 0 0 0 - - - + + + 255 254 235 - - - + + + 255 255 220 - - - + + + 0 0 0 @@ -200,135 +199,135 @@ - - - + + + 0 0 0 - - - + + + 255 253 215 - - - + + + 255 255 255 - - - + + + 255 254 235 - - - + + + 127 126 107 - - - + + + 170 169 143 - - - + + + 0 0 0 - - - + + + 255 255 255 - - - + + + 0 0 0 - - - + + + 255 255 255 - - - + + + 255 253 215 - - - + + + 0 0 0 - - - + + + 255 254 235 - - - + + + 255 255 220 - - - + + + 0 0 0 @@ -337,135 +336,135 @@ - - - + + + 127 126 107 - - - + + + 255 253 215 - - - + + + 255 255 255 - - - + + + 255 254 235 - - - + + + 127 126 107 - - - + + + 170 169 143 - - - + + + 127 126 107 - - - + + + 255 255 255 - - - + + + 127 126 107 - - - + + + 255 253 215 - - - + + + 255 253 215 - - - + + + 0 0 0 - - - + + + 255 253 215 - - - + + + 255 255 220 - - - + + + 0 0 0 @@ -475,67 +474,67 @@ - + true - + QFrame::NoFrame - + QFrame::Plain - - + + 12 - + 8 - + 6 - - - - + + + + 0 0 - + 10 - + - + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - + true - + true - - - - + + + + 0 0 - + 25 16777215 - + X @@ -544,57 +543,57 @@ - - - + + + 0 100 - + 0 - - - - + + + + 0 - - + + - - - + + + 0 0 0 - - - + + + 0 0 0 - - - + + + 255 255 255 - - - + + + 255 254 253 @@ -603,36 +602,36 @@ - - - + + + 0 0 0 - - - + + + 0 0 0 - - - + + + 255 255 255 - - - + + + 255 254 253 @@ -641,36 +640,36 @@ - - - + + + 128 128 128 - - - + + + 128 128 128 - - - + + + 255 254 253 - - - + + + 255 254 253 @@ -680,22 +679,22 @@ - + true - + QFrame::NoFrame - + QFrame::Raised - + - - + + Qt::ClickFocus - + QFrame::NoFrame @@ -705,27 +704,27 @@ - - - + + + 0 - + 4 - + - - + + Continue Reviewing - - + + :/icons/go-previous.png:/icons/go-previous.png - + 16 16 @@ -735,14 +734,14 @@ - - + + - - + + Qt::Vertical - + 20 38 @@ -751,16 +750,16 @@ - + - - + + Qt::Horizontal - + QSizePolicy::Expanding - + 1 20 @@ -769,41 +768,41 @@ - - + + QFrame::StyledPanel - + QFrame::Raised - + - - + + 0 - + 10 - - + + - + Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - - + + Qt::Vertical - + QSizePolicy::Fixed - + 20 6 @@ -812,60 +811,60 @@ - - + + 400 16777215 - + Qt::Horizontal - - + + 2 - + 6 - + 0 - + 6 - - - + + + 140 0 - - The <b>number of minutes in a session</b>. When a session is finished, this screen will be shown again, allowing you to start another session. Choose 0 for no limit. + + The <b>number of minutes in a session</b>. When a session is finished, this screen will be shown again, allowing you to start another session. Choose 0 for no limit. - - <b>Session limit (minutes):</b> + + <b>Session limit (minutes):</b> - + 4 - - - - + + + + 0 0 - + 50 16777215 @@ -873,34 +872,34 @@ - - - + + + 140 0 - - The maximum number of <b>new cards shown per day</b>. The default is 20, to ensure you don't get overwhelmed with reviews after a few days. + + The maximum number of <b>new cards shown per day</b>. The default is 20, to ensure you don't get overwhelmed with reviews after a few days. - - <b>New cards per day:</b> + + <b>New cards per day:</b> - + 4 - - - - + + + + 0 0 - + 50 16777215 @@ -908,12 +907,12 @@ - - - + + + Qt::Horizontal - + 40 20 @@ -921,15 +920,15 @@ - - - - + + + + 0 0 - + 50 16777215 @@ -937,15 +936,15 @@ - - - - The <b>number of questions in a session</b>. When a session is finished, this screen will be shown again, allowing you to start another session. Choose 0 for no limit. + + + + The <b>number of questions in a session</b>. When a session is finished, this screen will be shown again, allowing you to start another session. Choose 0 for no limit. - - <b>Session limit (questions): + + <b>Session limit (questions): - + 4 @@ -953,108 +952,108 @@ - + - - - + + + 10 - + 2 - + 6 - + 0 - + 0 - + - + - + - + - - + + 20 - + 10 - - - - + + + + 0 0 - + 0 26 - + Review - - + + :/icons/player-time.png:/icons/player-time.png - + true - + true - - - + + + 0 26 - + More - + true - + false - + false - - - + + + 0 26 - + Help @@ -1069,14 +1068,14 @@ - - + + Qt::Horizontal - + QSizePolicy::Expanding - + 1 20 @@ -1087,11 +1086,11 @@ - - + + Qt::Vertical - + 20 39 @@ -1101,14 +1100,14 @@ - - + + - - + + Qt::Vertical - + 20 219 @@ -1117,13 +1116,13 @@ - + - - + + Qt::Horizontal - + 40 20 @@ -1132,28 +1131,28 @@ - - + + QFrame::StyledPanel - + QFrame::Raised - + - - + + 10 - - + + Qt::Vertical - + QSizePolicy::Fixed - + 20 10 @@ -1162,24 +1161,24 @@ - - + + - + 0 - - + + Qt::Vertical - + QSizePolicy::Fixed - + 20 10 @@ -1188,11 +1187,11 @@ - - + + &Learn More - + 32 32 @@ -1201,11 +1200,11 @@ - - + + Re&view Early - + 32 32 @@ -1214,14 +1213,14 @@ - - + + Fi&nish - + true - + true @@ -1232,11 +1231,11 @@ - - + + Qt::Horizontal - + 40 20 @@ -1247,11 +1246,11 @@ - - + + Qt::Vertical - + 20 219 @@ -1261,17 +1260,17 @@ - - + + - - + + Qt::Vertical - + QSizePolicy::Preferred - + 20 10 @@ -1280,16 +1279,16 @@ - + - - + + Qt::Horizontal - + QSizePolicy::Expanding - + 10 20 @@ -1298,70 +1297,70 @@ - - - + + + 0 0 - + 200 200 - + QFrame::StyledPanel - + QFrame::Raised - + - - + + 10 - - - <h1>Decks</h1> + + + <h1>Decks</h1> - - + + Qt::Horizontal - - + + - + Qt::AlignCenter - - + + Qt::Horizontal - + - - + + Qt::Horizontal - + 40 20 @@ -1370,36 +1369,36 @@ - + - - + + Download - - + + :/icons/download.png:/icons/download.png - - + + Create - - + + :/icons/document-new.png:/icons/document-new.png - - + + Import - - + + :/icons/document-import.png:/icons/document-import.png @@ -1407,11 +1406,11 @@ - - + + Qt::Horizontal - + 40 20 @@ -1427,14 +1426,14 @@ - - + + Qt::Horizontal - + QSizePolicy::Expanding - + 10 20 @@ -1445,14 +1444,14 @@ - - + + Qt::Vertical - + QSizePolicy::Preferred - + 20 10 @@ -1465,37 +1464,37 @@ - - - + + + 0 1 - + - - - + + + 0 0 0 - - - + + + 255 255 255 - - - + + + 255 255 255 @@ -1504,27 +1503,27 @@ - - - + + + 0 0 0 - - - + + + 255 255 255 - - - + + + 255 255 255 @@ -1533,27 +1532,27 @@ - - - + + + 128 128 128 - - - + + + 255 255 255 - - - + + + 255 255 255 @@ -1563,37 +1562,37 @@ - + true - + 3 - - - + + + 0 - + 8 - + 4 - + 8 - + 4 - + - - + + Qt::Horizontal - + 40 20 @@ -1602,33 +1601,33 @@ - - - + + + 0 0 - + 0 41 - + Show the answer (shortcut key: space or enter) - + Show Answer - - + + Qt::Horizontal - + 40 20 @@ -1640,28 +1639,28 @@ - - - + + + 0 - + 4 - + 0 - + 4 - + - - + + Qt::Horizontal - + 40 0 @@ -1670,92 +1669,92 @@ - - + + 4 - + 4 - + 0 - - - + + + - + Qt::AlignCenter - - - + + + - + Qt::AlignCenter - - - + + + - + Qt::AlignCenter - - - + + + - + Qt::AlignCenter - - - + + + Show this card again soon (shortcut key: 1) - + Again - - - + + + Wait a little longer next time (shortcut key: 2) - + Hard - - - + + + Wait longer next time (shortcut key: 3) - + Good - - - + + + Wait a lot longer next time (shortcut key: 4) - + Easy @@ -1763,11 +1762,11 @@ - - + + Qt::Horizontal - + 40 0 @@ -1779,175 +1778,175 @@ - - + + - - + + QFrame::NoFrame - + QFrame::Raised - - + + 0 - + 0 - - + + Qt::Vertical - - - + + + 0 0 - + - - - + + + 0 0 0 - - - + + + 255 253 215 - - - + + + 255 255 255 - - - + + + 255 254 235 - - - + + + 127 126 107 - - - + + + 170 169 143 - - - + + + 0 0 0 - - - + + + 255 255 255 - - - + + + 0 0 0 - - - + + + 255 255 255 - - - + + + 255 253 215 - - - + + + 0 0 0 - - - + + + 255 254 235 - - - + + + 255 255 220 - - - + + + 0 0 0 @@ -1956,135 +1955,135 @@ - - - + + + 0 0 0 - - - + + + 255 253 215 - - - + + + 255 255 255 - - - + + + 255 254 235 - - - + + + 127 126 107 - - - + + + 170 169 143 - - - + + + 0 0 0 - - - + + + 255 255 255 - - - + + + 0 0 0 - - - + + + 255 255 255 - - - + + + 255 253 215 - - - + + + 0 0 0 - - - + + + 255 254 235 - - - + + + 255 255 220 - - - + + + 0 0 0 @@ -2093,135 +2092,135 @@ - - - + + + 127 126 107 - - - + + + 255 253 215 - - - + + + 255 255 255 - - - + + + 255 254 235 - - - + + + 127 126 107 - - - + + + 170 169 143 - - - + + + 127 126 107 - - - + + + 255 255 255 - - - + + + 127 126 107 - - - + + + 255 253 215 - - - + + + 255 253 215 - - - + + + 0 0 0 - - - + + + 255 253 215 - - - + + + 255 255 220 - - - + + + 0 0 0 @@ -2231,177 +2230,177 @@ - + true - + QFrame::NoFrame - + QFrame::Raised - - + + 6 - + 9 - - + + true - - + + 0 0 - + 250 0 - + 300 16777215 - + - - - + + + 0 0 0 - - - + + + 255 253 215 - - - + + + 255 255 255 - - - + + + 255 254 235 - - - + + + 127 126 107 - - - + + + 170 169 143 - - - + + + 0 0 0 - - - + + + 255 255 255 - - - + + + 0 0 0 - - - + + + 255 253 215 - - - + + + 255 253 215 - - - + + + 0 0 0 - - - + + + 255 254 235 - - - + + + 255 255 220 - - - + + + 0 0 0 @@ -2410,135 +2409,135 @@ - - - + + + 0 0 0 - - - + + + 255 253 215 - - - + + + 255 255 255 - - - + + + 255 254 235 - - - + + + 127 126 107 - - - + + + 170 169 143 - - - + + + 0 0 0 - - - + + + 255 255 255 - - - + + + 0 0 0 - - - + + + 255 253 215 - - - + + + 255 253 215 - - - + + + 0 0 0 - - - + + + 255 254 235 - - - + + + 255 255 220 - - - + + + 0 0 0 @@ -2547,135 +2546,135 @@ - - - + + + 127 126 107 - - - + + + 255 253 215 - - - + + + 255 255 255 - - - + + + 255 254 235 - - - + + + 127 126 107 - - - + + + 170 169 143 - - - + + + 127 126 107 - - - + + + 255 255 255 - - - + + + 127 126 107 - - - + + + 255 253 215 - - - + + + 255 253 215 - - - + + + 0 0 0 - - - + + + 255 253 215 - - - + + + 255 255 220 - - - + + + 0 0 0 @@ -2685,16 +2684,16 @@ - + true - + QFrame::NoFrame - + QFrame::Sunken - + Qt::ScrollBarAlwaysOff @@ -2707,760 +2706,769 @@ - - + + 0 0 - 538 - 23 + 550 + 25 - - + + &Help - - - - - - - - + + + + + + + + - - + + &Edit - - - - - - - - - - - + + + + + + + + + + + - - + + &File - - + + &Download - - + + :/icons/document-open-remote.png:/icons/document-open-remote.png - - - - + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - + + &Tools - - + + Ad&vanced - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - + + &Settings - - + + P&lugins - - + + :/icons/preferences-plugin.png:/icons/preferences-plugin.png - - + + Startup - - - + + + - - - - + + + + - - - - - - - - + + + + + + + + - - - - - + + + + + - - + + true - - + + true - + Qt::Horizontal - + 32 32 - + TopToolBarArea - + false - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - + + + :/icons/application-exit.png:/icons/application-exit.png - + E&xit - + Ctrl+Q - - - + + + :/icons/document-new.png:/icons/document-new.png - + &New - + Ctrl+N - - - + + + :/icons/document-open.png:/icons/document-open.png - + &Open... - + Ctrl+O - - - + + + :/icons/view_text.png:/icons/view_text.png - + &Close - + Close this deck and return to the deck browser - + Ctrl+W - - - + + + :/icons/document-save.png:/icons/document-save.png - + &Save - + Save this deck now - + Ctrl+S - + Qt::ApplicationShortcut - - - + + + :/icons/multisynk.png:/icons/multisynk.png - + S&ync - + Synchronize this deck with Anki Online - + Ctrl+Y - - - + + + :/icons/list-add.png:/icons/list-add.png - + &Add Items... - + Add new items to Anki by typing them in - + Ctrl+D - - - + + + :/icons/find.png:/icons/find.png - + Brows&e Items... - + Browse and edit all items - + Ctrl+F - - - + + + :/icons/configure.png:/icons/configure.png - + &Preferences - + Configure interface language and options - + Ctrl+P - + QAction::PreferencesRole - - - + + + :/icons/spreadsheet.png:/icons/spreadsheet.png - + &Deck Statistics - + Show some textual statistics about your deck - - - + + + :/icons/help.png:/icons/help.png - + Documentation - + F1 - - - + + + :/icons/kbugbuster.png:/icons/kbugbuster.png - + &Report Bug... - + Open the bug tracker - - - + + + :/icons/anki.png:/icons/anki.png - + &About... - + QAction::AboutRole - - - + + + :/icons/package_games_card.png:/icons/package_games_card.png - + &Card Statistics - + Show statistics about the current card and last card - - - + + + :/icons/contents.png:/icons/contents.png - + &Deck Properties... - + Customize syncing, scheduling, priorities and models - - - + + + :/icons/document-import.png:/icons/document-import.png - + &Import... - + Import cards from text files, Anki files and more - - - + + + :/icons/view-statistics.png:/icons/view-statistics.png - + &Graphs... - + Show graphical statistics about your deck - - - + + + :/icons/document-export.png:/icons/document-export.png - + Expor&t... - + Save cards in a new deck or text file for sharing with others - - - + + + :/icons/preferences-desktop-font.png:/icons/preferences-desktop-font.png - + &Fonts and Colours... - + Customize fonts, colours and alignment - - + + true - - + + :/icons/rating.png:/icons/rating.png - + &Mark Fact - + Apply the 'marked' tag to this fact, so you find it later in the browser - + Ctrl+M - - - + + + :/icons/media-playback-pause.png:/icons/media-playback-pause.png - + &Suspend Card - + Stop reviewing this card until it's unsuspended in the browser - + Ctrl+Shift+S - - + + false - - + + :/icons/media-playback-start.png:/icons/media-playback-start.png - + Repeat &Audio - + Play the last-played audio again - + F5 - - + + false - - + + :/icons/edit-undo.png:/icons/edit-undo.png - + &Undo - + Ctrl+Z - - - + + + :/icons/view-pim-news.png:/icons/view-pim-news.png - + &Forum... - - - + + + :/icons/document-save-as.png:/icons/document-save-as.png - + Save &As... - + Save this deck, giving it a new name - - - + + + :/icons/sqlitebrowser.png:/icons/sqlitebrowser.png - + Quick Database Check - + Check the database for errors - - - + + + :/icons/games-solve.png:/icons/games-solve.png - + Optimize Database - + Remove unused space, making the database file smaller - - - + + + :/icons/text-speak.png:/icons/text-speak.png - + Check Media Database... - + Check the files in the media directory - - - + + + :/icons/view-pim-calendar.png:/icons/view-pim-calendar.png - + C&ram... - + Do an extra review of specified cards before a test - - - + + + :/icons/kblogger.png:/icons/kblogger.png - + Release Notes... - - + + &Open Plugin Folder... - - + + &Enable All Plugins - - + + &Disable All Plugins - - - + + + :/icons/anki-tag.png:/icons/anki-tag.png - + Inactive &Tags... - + Choose the categories to show during review - - - + + + :/icons/edit-rename.png:/icons/edit-rename.png - + Edit &Current... - + Edit the currently displayed item - + Ctrl+E - - - + + + :/icons/edit-redo.png:/icons/edit-redo.png - + &Redo - - - + + + :/icons/editdelete.png:/icons/editdelete.png - + &Delete Card - + Delete the currently displayed card - + Ctrl+Del - - + + Cache LaTeX - + Pre-generate PNG images of LaTeX cards - - + + Uncache LaTeX - + Remove generated PNG images of LaTeX cards - - - + + + :/icons/chronometer.png:/icons/chronometer.png - + &Study Options... - + Configure review options - - - + + + :/icons/emblem-favorite.png:/icons/emblem-favorite.png - + &Donate... - - - + + + :/icons/media-record.png:/icons/media-record.png - + &Record Noise Profile... - + Record 10 seconds of silence so that the record function can cancel noise - - + + Personal Deck... - + Download a deck that you synced from another computer - - + + Shared Deck... - + Download a deck that people have shared publicly - - + + Shared Plugin... - + Download a plugin to add new features or change Anki's behaviour - - - + + + :/icons/khtml_kget.png:/icons/khtml_kget.png - + &Bury Fact - + Suspend the current fact until the deck is closed and opened again - + Ctrl+Shift+B - - + + Full Database Check... - - - + + + :/icons/document-open-recent.png:/icons/document-open-recent.png - + Open Recent... - + Ctrl+R - - + + Download Missing Media + + + Export Original Files + + + Save media files using original file names + + newPerDay @@ -3490,7 +3498,7 @@ welcomeText - + @@ -3499,11 +3507,11 @@ optionsBox setShown(bool) - + 218 250 - + 222 300