mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 05:05:20 -05:00
rbutil: add a option to ignore specific files for .talk file generation.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22478 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
139127217a
commit
7feb639938
4 changed files with 152 additions and 138 deletions
|
|
@ -159,6 +159,19 @@ bool TalkFileCreator::createTalkList(QDir startDir)
|
|||
// insert into List
|
||||
if( !fileInf.fileName().isEmpty() && !fileInf.fileName().endsWith(".talk") && m_talkFiles)
|
||||
{
|
||||
//test if we should ignore this file
|
||||
bool match = false;
|
||||
for(int i=0; i < m_ignoreFiles.size();i++)
|
||||
{
|
||||
QRegExp rx(m_ignoreFiles[i].trimmed());
|
||||
rx.setPatternSyntax(QRegExp::Wildcard);
|
||||
if(rx.exactMatch(fileInf.fileName()))
|
||||
match = true;
|
||||
}
|
||||
if(match)
|
||||
continue;
|
||||
|
||||
//generate entry
|
||||
TalkGenerator::TalkEntry entry;
|
||||
if(m_stripExtensions)
|
||||
entry.toSpeak = stripExtension(fileInf.fileName());
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ public:
|
|||
void setStripExtensions(bool ov) {m_stripExtensions = ov;}
|
||||
void setTalkFolders(bool ov) {m_talkFolders = ov;}
|
||||
void setTalkFiles(bool ov) {m_talkFiles = ov;}
|
||||
|
||||
void setIgnoreFiles(QStringList wildcards) {m_ignoreFiles=wildcards;}
|
||||
public slots:
|
||||
void abort();
|
||||
|
||||
|
|
@ -72,7 +72,8 @@ private:
|
|||
bool m_stripExtensions;
|
||||
bool m_talkFolders;
|
||||
bool m_talkFiles;
|
||||
|
||||
QStringList m_ignoreFiles;
|
||||
|
||||
bool m_abort;
|
||||
|
||||
QList<TalkGenerator::TalkEntry> m_talkList;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue