Merge lp:~ubuntu-fr-scripts/ufrs-audio/audio-new into lp:ufrs-audio

Proposed by Jean-Mi
Status: Needs review
Proposed branch: lp:~ubuntu-fr-scripts/ufrs-audio/audio-new
Merge into: lp:ufrs-audio
Diff against target: None lines
To merge this branch: bzr merge lp:~ubuntu-fr-scripts/ufrs-audio/audio-new
Reviewer Review Type Date Requested Status
Jean-Mi passage branche principale Approve
Etienne Gadeski passage branche principale Pending
Review via email: mp+4874@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Jean-Mi (jeanmi) wrote :

pour faire le tri de ce qui ira dans la branche principale

Revision history for this message
Jean-Mi (jeanmi) wrote :

Passage à la branche principale en vue du tri à faire

review: Approve (passage branche principale)
26. By Jean-Mi

migration de convto -> convto.sh + pod

27. By Jean-Mi

Corrections audio.sh ajout audio.conf pour surcharge des variables

28. By Jean-Mi

corrections localisation fichier conf et ajout cut en fin du script audio.sh

29. By Jean-Mi

amélioration du traitement du fichier de configuration

30. By Jean-Mi

amélioration de la prise en compte du fichier de configuration

31. By Jean-Mi

corrections typo

Unmerged revisions

31. By Jean-Mi

corrections typo

30. By Jean-Mi

amélioration de la prise en compte du fichier de configuration

29. By Jean-Mi

amélioration du traitement du fichier de configuration

28. By Jean-Mi

corrections localisation fichier conf et ajout cut en fin du script audio.sh

27. By Jean-Mi

Corrections audio.sh ajout audio.conf pour surcharge des variables

26. By Jean-Mi

migration de convto -> convto.sh + pod

25. By Jean-Mi

suppression fichiers inutiles, modification convto, récupération de la dernière version de script.sh

24. By Jean-Mi

Je commence la migration du scritp convto en convto.sh

23. By Jean-Mi

Les pensées du jour

22. By Jean-Mi

ajout des scripts de pmd

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file 'LICENSE'
--- LICENSE 1970-01-01 00:00:00 +0000
+++ LICENSE 2009-03-09 20:55:34 +0000
@@ -0,0 +1,225 @@
1GNU GENERAL PUBLIC LICENSE
2
3Version 3, 29 June 2007
4
5Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>
6
7Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
8Preamble
9
10The GNU General Public License is a free, copyleft license for software and other kinds of works.
11
12The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.
13
14When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.
15
16To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.
17
18For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
19
20Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.
21
22For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.
23
24Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.
25
26Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.
27
28The precise terms and conditions for copying, distribution and modification follow.
29TERMS AND CONDITIONS
300. Definitions.
31
32“This License” refers to version 3 of the GNU General Public License.
33
34“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.
35
36“The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations.
37
38To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work.
39
40A “covered work” means either the unmodified Program or a work based on the Program.
41
42To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.
43
44To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.
45
46An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.
471. Source Code.
48
49The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work.
50
51A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.
52
53The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.
54
55The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.
56
57The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.
58
59The Corresponding Source for a work in source code form is that same work.
602. Basic Permissions.
61
62All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.
63
64You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.
65
66Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.
673. Protecting Users' Legal Rights From Anti-Circumvention Law.
68
69No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.
70
71When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.
724. Conveying Verbatim Copies.
73
74You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.
75
76You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.
775. Conveying Modified Source Versions.
78
79You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:
80
81 * a) The work must carry prominent notices stating that you modified it, and giving a relevant date.
82 * b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”.
83 * c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.
84 * d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.
85
86A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.
876. Conveying Non-Source Forms.
88
89You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:
90
91 * a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.
92 * b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.
93 * c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.
94 * d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements.
95 * e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.
96
97A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.
98
99A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.
100
101“Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.
102
103If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).
104
105The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.
106
107Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.
1087. Additional Terms.
109
110“Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.
111
112When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.
113
114Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:
115
116 * a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or
117 * b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or
118 * c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or
119 * d) Limiting the use for publicity purposes of names of licensors or authors of the material; or
120 * e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or
121 * f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.
122
123All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.
124
125If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.
126
127Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.
1288. Termination.
129
130You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).
131
132However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.
133
134Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.
135
136Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.
1379. Acceptance Not Required for Having Copies.
138
139You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.
14010. Automatic Licensing of Downstream Recipients.
141
142Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.
143
144An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.
145
146You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.
14711. Patents.
148
149A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”.
150
151A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.
152
153Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.
154
155In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.
156
157If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.
158
159If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.
160
161A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.
162
163Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.
16412. No Surrender of Others' Freedom.
165
166If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.
16713. Use with the GNU Affero General Public License.
168
169Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.
17014. Revised Versions of this License.
171
172The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
173
174Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.
175
176If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.
177
178Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.
17915. Disclaimer of Warranty.
180
181THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
18216. Limitation of Liability.
183
184IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
18517. Interpretation of Sections 15 and 16.
186
187If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.
188
189END OF TERMS AND CONDITIONS
190How to Apply These Terms to Your New Programs
191
192If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
193
194To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found.
195
196 <one line to give the program's name and a brief idea of what it does.>
197 Copyright (C) <year> <name of author>
198
199 This program is free software: you can redistribute it and/or modify
200 it under the terms of the GNU General Public License as published by
201 the Free Software Foundation, either version 3 of the License, or
202 (at your option) any later version.
203
204 This program is distributed in the hope that it will be useful,
205 but WITHOUT ANY WARRANTY; without even the implied warranty of
206 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
207 GNU General Public License for more details.
208
209 You should have received a copy of the GNU General Public License
210 along with this program. If not, see <http://www.gnu.org/licenses/>.
211
212Also add information on how to contact you by electronic and paper mail.
213
214If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:
215
216 <program> Copyright (C) <year> <name of author>
217 This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
218 This is free software, and you are welcome to redistribute it
219 under certain conditions; type `show c' for details.
220
221The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an “about box”.
222
223You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <http://www.gnu.org/licenses/>.
224
225The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <http://www.gnu.org/philosophy/why-not-lgpl.html>.
0226
=== added file 'NEWS.convto'
--- NEWS.convto 1970-01-01 00:00:00 +0000
+++ NEWS.convto 2009-03-17 00:18:17 +0000
@@ -0,0 +1,5 @@
1###############################################################################
2mardi 17 mars 2009, 00:02:26 (UTC+0100)
3###############################################################################
4Ajout du traitement récursif
5
06
=== added file 'TODO'
--- TODO 1970-01-01 00:00:00 +0000
+++ TODO 2009-03-17 01:34:59 +0000
@@ -0,0 +1,14 @@
1###############################################################################
2mardi 17 mars 2009, 00:02:26 (UTC+0100)
3###############################################################################
4Fidji
5Trouver un vimrc pour scripts et bzr si ça existe
6
7###############################################################################
8vendredi 13 mars 2009, 06:06:31 (UTC+0100)
9###############################################################################
10Fidji
11Ajouter un script de création de playtlists
12find ~/music/ -iname "*.mp3" -print > ~/Desktop/playlist.m3u
13 * Choix de création d'une playlist par dossier et ou générale
14 * Choix des types de fichiers
015
=== added file 'TODO.convto'
--- TODO.convto 1970-01-01 00:00:00 +0000
+++ TODO.convto 2009-03-17 00:18:17 +0000
@@ -0,0 +1,34 @@
1###############################################################################
2mardi 17 mars 2009, 00:02:26 (UTC+0100)
3###############################################################################
4Tester les modifications prenant en compte le traitement récursif
5Utiliser le modèle POD de Mathias
6Standardiser l'usage du .sh
7Intégrer l'option pour :
8 suppressions des blanc dans les noms de fichiers
9 supprimer les accents
10 supprimer les .#~ et autres caractères
11 Minuscule/Majuscule
12 Création d'un playlist
13 convertir en utf8 ou autre charset
14Trouver un vimrc pour scripts et bzr si ça existe
15
16
17###############################################################################
18vendredi 13 mars 2009, 06:06:31 (UTC+0100)
19###############################################################################
20Ajouter la prise en charge d'autres formats audio
21Ajouter une option pour supprimer la source une fois convertie
22Intégrer le traitement récursif sur les répertoires
23Ajouter une option pour ajuster la qualité des mp3 (défaut 192)
24
25###############################################################################
26Jeudi 12 mars 2009, 08:01:24 (UTC+0100)
27###############################################################################
28Intégrer le traitement récursif sur les dossiers
29Tests de conversion ogg <-> mp3
30
31convto mp3 *.ogg # ok
32convto ogg *.mp3 # ok
33convto ogg . # Erreur
34convto mp3 . # Erreur
035
=== added file 'TODO.mp3gainize'
--- TODO.mp3gainize 1970-01-01 00:00:00 +0000
+++ TODO.mp3gainize 2009-03-13 05:19:32 +0000
@@ -0,0 +1,6 @@
1###############################################################################
2vendredi 13 mars 2009, 06:06:31 (UTC+0100)
3###############################################################################
4Adapter le script en prenant pour modèle le script convto
5Traitement par défaut par album, ajouter un fichier de configuration pour solo
6
07
=== added file 'TODO.playdir'
--- TODO.playdir 1970-01-01 00:00:00 +0000
+++ TODO.playdir 2009-03-13 05:36:10 +0000
@@ -0,0 +1,6 @@
1###############################################################################
2vendredi 13 mars 2009, 06:06:31 (UTC+0100)
3###############################################################################
4Ajouter la prise en charge d'autres formats audio
5Intégrer le traitement récursif sur les répertoires
6
07
=== added file 'audio_convertor'
--- audio_convertor 1970-01-01 00:00:00 +0000
+++ audio_convertor 2009-03-12 16:54:50 +0000
@@ -0,0 +1,103 @@
1#!/bin/bash
2# Auteur : Etienne Gadeski
3# This program is free software; you can redistribute it and/or modify
4# it under the terms of the GNU General Public License as published by
5# the Free Software Foundation; either version 2 of the License, or
6# (at your option) any later version.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU General Public License for more details.
12#
13# You should have received a copy of the GNU General Public License
14# along with this program; if not, write to the Free Software
15# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
16# MA 02110-1301, USA.
17#
18# Désolé pour la suppression du script... Mea culpa, Mea maxima culpa
19# usage : audio_convertor [ -r (recursif) | -d (dossier) ] ogg2mp3 | mp32ogg fichier | dossier
20gethelp() {
21 echo "${0##*/} [ -r (recursif) | -d (dossier) ] ogg2mp3 | mp32ogg fichier | dossier"
22}
23
24#---testdir effectue des test sur le dossier a traiter
25testdir() {
26 if [ ! -d "$1" ] ; then
27 echo "Dossier invalide"
28 echo
29 gethelp
30 return 1
31 elif [ ! -r "$1" ] ; then
32 echo "Dossier invalide"
33 echo
34 gethelp
35 return 2
36 elif [ ! -w "$1" ] ; then
37 echo "Dossier invalide"
38 gethelp
39 return 3
40 else
41 return 0
42 fi
43}
44
45#---testfic effectue des test sur le fichier a traiter
46testfic() {
47 if [ ! -f "$1" ] ; then
48 echo "Fichier invalide"
49 echo
50 gethelp
51 return 1
52 elif [ ! -r "$1" ] ; then
53 echo "Fichier invalide"
54 echo
55 gethelp
56 return 2
57 elif [ ! -w "$PWD" ] ; then
58 echo "Ne peut ecrire dans $PWD"
59 echo
60 gethelp
61 return 3
62 else
63 return 0
64 fi
65}
66[ "$#" -eq 0 ] && echo "Parametres insuffisants" && exit 1
67MODE=solo
68until [ "$#" -eq 0 ] ; do # tant qu'il y a des parametres
69 case "$1" in
70 mp32ogg) OPTMP3="--"
71 FROM=mp3
72 TO=ogg;;
73 ogg2mp3) OPTMP3="-ab 192k"
74 FROM=ogg
75 TO=mp3;;
76 -r) MODE=recursif;;
77 -d) MODE=dossier;;
78 -h|--help) gethelp;;
79 *) case "$MODE" in
80 recursif) testdir "$1" && \
81 while read -d $'\0' "fic"
82 do
83 ffmpeg -i "$fic" "$OPTMP3" "${fic%.${FROM}}.${TO}" >/dev/null 2>&1
84 done < <(find "$1" -name "*.${FROM}" -print0)
85 ;;
86 dossier)
87 testdir "$1" && \
88 fichiers=($1/*.${FROM})
89 dialog --gauge "Conversion en cours, veuillez patienter..." 20 75 < <( # créé une barre de progres
90 n=${#fichiers[*]}; i=0
91 for fic in "${fichiers[@]}"; do
92 ffmpeg -i "$fic" "$OPTMP3" "${fic%.${FROM}}.${TO}" >/dev/null 2>&1
93 echo $((100*(++i)/n))
94 done)
95 ;;
96 solo) testfic "$1" && \
97 ffmpeg -i "$1" "$OPTMP3" "${1%.${FROM}}.${TO}"
98 ;;
99 *);;
100 esac;;
101 esac
102 shift
103done
0104
=== added file 'convto'
--- convto 1970-01-01 00:00:00 +0000
+++ convto 2009-03-21 03:44:44 +0000
@@ -0,0 +1,136 @@
1#!/bin/bash
2#
3# Auteur : Etienne Gadeski
4# Adaptation : Jean-Michel Juzan
5#
6# This program is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation; either version 2 of the License, or
9# (at your option) any later version.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with this program; if not, write to the Free Software
18# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19# MA 02110-1301, USA.
20#
21# for i in *.wma; do ffmpeg -i "$i" -ab 256k "${i%wma}mp3"; done
22#
23usage="Usage: ${0##*/} [ OPTION ]...[ FICHIER | DESTINATION ]..."
24aide="${usage}\
25Convertir les fichiers mp3 en ogg et inversement\
26 -r traitement récursif\
27 ogg converti en ogg\
28 mp3 converti en mp3\
29 -h --help cette aide"
30
31# Fonctions
32# Affiche les messages
33getmsg() {
34 echo ${msg}
35 echo
36}
37
38#---testdir effectue des test sur le dossier a traiter
39testdir() {
40 if [ ! -d "${rep}" ] ; then
41 echo "${rep} n'est pas un répertoire"
42 echo
43 return 1
44 elif [ ! -r "${rep}" ] ; then
45 echo "${rep} n'est pas accessible en lecture"
46 echo
47 return 2
48 elif [ ! -w "${rep}" ] ; then
49 echo "${rep} n'est pas accessible en écriture"
50 echo
51 return 3
52 else
53 return 0
54 fi
55}
56
57#---testfic effectue des test sur le fichier a traiter
58testfic() {
59 if [ ! -f "${fic}" ] ; then
60 echo "${fic} n'est pas un fichier valide"
61 echo
62 return 1
63 elif [ ! -r "${fic}" ] ; then
64 echo "${fic} n'est pas accessible en lecture"
65 echo
66 return 2
67 elif [ ! -w "${PWD}" ] ; then
68 echo "Ne peut ecrire dans ${PWD}"
69 echo
70 return 3
71 else
72 return 0
73 fi
74}
75dofic() {
76 testfic && \
77 ffmpeg -i "${fic}" ${OPTMP3} "${fic%.${FROM}}.${TO}" #>/dev/null 2>&1
78 return 0
79}
80
81dorep() {
82 rep=${1}
83 testdir && \
84 fichiers=("${rep}/"*.${FROM})
85 # Barre de progression
86 dialog --gauge "Conversion de ${rep} en cours, veuillez patienter..." 20 75 < <(
87 n=${#fichiers[*]}
88 if [ ! "${n}" ] ; then
89 msg="Aucun fichier à traiter"
90 getmsg
91 return 1
92 fi
93 i=0
94 for fic in "${fichiers[@]}"; do
95 dofic
96 echo $((100*(++i)/n))
97 done
98 #)
99 return 0
100}
101
102# main
103# S'il n'y a pas de paramètre
104[ "$#" -eq 0 ] && msg=$usage && getmsg && exit 1
105MODE=solo
106OPTMP3=""
107
108until [ "$#" -eq 0 ] ; do # tant qu'il y a des parametres
109 case "$1" in
110 ogg)
111 FROM=mp3
112 TO=ogg;;
113 mp3) FROM=ogg
114 OPTMP3="-ab 192k"
115 TO=mp3;;
116 -r) MODE=recursif;;
117 -h|--help) msg=$aide
118 getmsg;;
119 *) if [ -f "${1}" ] ; then # Si c'est un fichier
120 fic="${1}"
121 dofic
122 fi
123 if [ -d "${1}" ] ; then # Si c'est un répertoire
124 if [ ${MODE} = "recursif" ] ; then
125 find "${1}" -type d | while read frep
126 do
127 dorep "${frep}"
128 done
129 else
130 dorep "${1}"
131 fi
132 fi
133 ;;
134 esac
135 shift
136done
0137
=== added file 'convto.sh'
--- convto.sh 1970-01-01 00:00:00 +0000
+++ convto.sh 2009-03-21 03:44:44 +0000
@@ -0,0 +1,230 @@
1#!/bin/bash
2#
3# Auteur(s) :
4#
5# Maintenu par l'équipe ubuntu-fr-script
6# https://launchpad.net/~ubuntu-fr-scripts
7#
8# This program is free software; you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by
10# the Free Software Foundation; either version 2 of the License, or
11# (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License
19# along with this program; if not, write to the Free Software
20# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
21# MA 02110-1301, USA.
22#
23
24###############################################################################
25# Variables
26###############################################################################
27# Commandes builtin
28#------------------
29CMD_EVAL="builtin eval"
30CMD_EXIT="builtin exit"
31
32# Commandes UNIX standards
33#------------------------
34CMD_BASENAME="basename"
35CMD_DIRNAME="dirname"
36CMD_SED="sed"
37CMD_GREP="grep"
38
39# Autres commandes
40#----------------
41CMD_PERL="perl"
42
43
44CMD_PRINT_SHORT_HELP="$CMD_EVAL $CMD_PERL -e 'use Pod::Usage; pod2usage(-verbose=>0,-input=>\$ARGV[0])' `$CMD_BASENAME $0`"
45CMD_PRINT_HELP="$CMD_EVAL $CMD_PERL -e 'use Pod::Usage; pod2usage(-verbose=>1,-input=>\$ARGV[0])' `$CMD_BASENAME $0`"
46CMD_PRINT_MANPAGE="$CMD_EVAL $CMD_PERL -e 'use Pod::Usage; pod2usage(-verbose=>2,-input=>\$ARGV[0])' `$CMD_BASENAME $0`"
47
48# Vous pouvez ici ajouter vos variables
49
50###############################################################################
51# Fonctions
52###############################################################################
53
54#----------------------------------------------------------------------
55# analyseLigneCommande
56# analyse les paramètres de la ligne de commande
57#
58# entrée:
59# - les paramètres de la ligne de commande à analyser
60# note:
61# - rien
62# retour:
63# - rien
64#
65#----------------------------------------------------------------------
66function analyseLigneCommande()
67{
68 while getopts "hm" Option
69 do
70 case $Option in
71 h ) $CMD_PRINT_HELP
72 $CMD_EXIT
73 ;;
74 m ) $CMD_PRINT_MANPAGE
75 $CMD_EXIT
76 ;;
77 * ) $CMD_PRINT_SHORT_HELP
78 $CMD_EXIT 1
79 ;;
80 esac
81 done
82}
83
84# Vous pouvez ajouter ici vos fonctions
85
86###############################################################################
87# MAIN
88###############################################################################
89analyseLigneCommande "$@"
90
91# Vous pouver ajouter ici le programme principal (main)
92
93
94# Dans la section POD Ajouter les informations nécessaire à la création
95# de la page de manuel et la page html
96#
97# POD section -----------------------------------------------------------------
98
99: <<=cut
100
101=pod
102
103=head1 NOM
104
105monscript.sh - Le programme fait ceci et cela...
106
107=head1 SYNOPSIS
108
109Un cours résumé de l'usage du script.
110
111B<monscript.sh> { B<ceci>|B<cela> } [ B<-flags> ] [ B<-o> I<option> ] I<argument> [ I<plus...> ]
112
113=head1 DESCRIPTION
114
115Longue description du script et de ses possibilités. C'est une bonne idée de diviser en sous chapître cette partie.
116En utilisant "=head2" de cette manière
117
118=head2 Un exemple de sous chapître
119
120=head2 Un autre exemple de sous chapître
121
122Les références à propos de foo(1) (ou autre) page de manuel, peuvent être écrit normallement
123comme ici; B<pod2man> Nous invitons à utiliser le bon format . Utilisez S<L><>
124(e.g. L<foo(SECTION)>) si vous souhaitez forcer cela.
125
126Les paragraphes sont séparés par des lignes vide.
127
128=head1 OPTIONS
129
130Certaines personnes sépare ceci de la description.
131
132Le style suivant est le plus utilisé pour documenter les options:
133
134=over 8
135
136=item B<ceci>|B<cela>
137
138L'utilisateur doit explicitement spécifier B<ceci> ou B<cela> pour pouvoir exécuter le script.
139Les accolades { et } indique que ce qui est à l'intérieur est requis. La barre | sépare des options exclusives.
140(i.e. Vous ne pouvez pas avoir les deux à la fois).
141
142=item B<-o> I<option>
143
144Passe l'I<option> fournit par l'utilisateur à B<monscript.sh> pour changer son comportement.
145Le fait que l'I<option> soit souligné ou en italique veut dire que l'utilisateur la remplace
146par une valeur valide pour cette option. Les crochets [ et ] indique qu'elle n'est pas obligatoire.
147
148=item I<argument>
149
150Le dernier I<argument> est requis, parce qu'il n'est pas entre crochets.
151
152=item I<plus>
153
154indique que l'utilisateur peut optionnelement ajouter d'autre argument à la fin.
155Les (...) indique qu'un ou plus the paramètre est autorisé.
156
157=back
158
159=head1 VALEUR DE RETOUR
160
161Ce que le script renvoie comme valeur en cas de succès.
162
163=head1 ERREURS
164
165Code de retours d'erreurs.
166
167=head1 EXEMPLES
168
169Donner quelques exemples d'utilisation du script.
170
171=head1 ENVIRONEMENT
172
173Des variables d'environement qui affecte le script.
174
175=head1 FICHIERS
176
177Tous les fichiers utilisés par le script. Un usage typique est comme ceci:
178
179=over 8
180
181=item F</usr/man>
182
183répertoire du man par défaut
184
185=item F</usr/man/man*/*.*>
186
187pages de man non formatées
188
189=back
190
191=head1 NOTES
192
193Des commentaires généraux.
194
195=head1 CAVEATS
196
197Des points auxquels il faut prêter attention, parfois appelé WARNINGS.
198
199=head1 DIAGNOSTICS
200
201Tous les messages d'erreurs possibles que le script peut afficher,
202ce qu'ils veulent dire et comment les corriger si c'est possible.
203
204=head1 BUGS
205
206Des choses qui sont cassés ou qui ne fontionne pas bien.
207
208=head1 RESTRICTIONS
209
210Des bugs que vous ne planifiez pas de corriger :-)
211
212=head1 AUTEUR
213
214Qui l'a écrit (ou AUTEURS s'il y en a plusieurs)
215
216Cette exemple a été construit par Colin Watson <S<cjwatson@debian.org>>
217sur un template fournit par Tom Christiansen <S<tchrist@jhereg.perl.com>>.
218
219=head1 HISTORIQUE
220
221Certain programmes dérivés d'autre sources ont parfois cette section.
222
223=head1 VOIR AUSSI
224
225D'autre pages man à voir, comme man(1), man(7), mandb(8), catman(8).
226
227Pour cette exemple, voir pod2man(1) pour plus de détails.
228
229=cut
230
0231
=== added file 'm4a2mp3.sh'
--- m4a2mp3.sh 1970-01-01 00:00:00 +0000
+++ m4a2mp3.sh 2009-03-16 19:22:21 +0000
@@ -0,0 +1,19 @@
1#!/bin/bash
2# m4a2mp3.sh - By pmd - http://pmdz.info
3# But : Convertir des fichiers m4a/aac vers mp3
4# Paquets requis : faad lame
5# Licence : http://creativecommons.org/licenses/by-nc-sa/2.0/fr/
6# Paternité - Pas d'Utilisation Commerciale - Partage des Conditions Initiales à l'Identique
7
8# Pour tous les fichiers se terminant par .m4a
9for i in *.m4a
10do
11# m4a vers wav
12faad "$i"
13x=`echo "$i"|sed -e 's/.m4a/.wav/'`
14y=`echo "$i"|sed -e 's/.m4a/.mp3/'`
15# wav vers mp3
16lame -h -b 192 "$x" "$y"
17rm "$x"
18rm "$i"
19done
020
=== added file 'mp3gainize'
--- mp3gainize 1970-01-01 00:00:00 +0000
+++ mp3gainize 2009-03-13 03:42:32 +0000
@@ -0,0 +1,175 @@
1#!/bin/bash
2# $Id$
3# Ce script demande un grand coup de balai !
4
5# Valeur par defaut :
6dstdir="${HOME}/data/musique"
7tmpdir="${HOME}/tmp"
8suffix="mp3"
9
10debug=0
11muet=0
12bavard=0
13recursif=0
14type="solo"
15typesrc=""
16
17############## FONCTIONS ################
18
19function gainonfile()
20{
21 test ${debug} -eq 1 && echo -e "gainonfile: Chemin de travail : ${PWD}"
22 mp3gain -c "$1"
23}
24function gainondir()
25{
26 test ${debug} -eq 1 && echo -e "gainondir: Chemin de travail : ${PWD}"
27 test ${debug} -eq 0 && echo -e "Chemin de travail : ${PWD}"
28 mp3ici=`find . -type f -maxdepth 1 -iregex '.*\.[Mm][Pp]3'`
29 test -z "${mp3ici}" && return
30 mp3gain -c -a *.[Mm][Pp]3
31}
32function testdir()
33{
34 test ${debug} -eq 1 && echo -e "testdir: Verifie les droits du repertoire $1"
35 wok=1 # Par defaut le repertoire doit etre en ecriture
36 # Si nous ne pouvons pas ecrire en mode muet sortie
37 test ${muet} -eq 1 && test ! -w "$1" && wok=0 &&
38 echo -e "Impossible d'ecrire dans le repertoire $1" &&
39 kdialog --passivepopup "Impossible d'ecrire dans le repertoire $1" 3 &&
40 return
41
42 dstdir="$1"
43 while test ! -w "${dstdir}"
44 do
45 kdialog --error "Vous n'avez pas le droit d'ecrire dans le repertoire ${dstdir}"
46 dstdir=$(kdialog --title "Choisissez un autre repertoire" --getexistingdirectory $dstdir)
47 test -z ${dstdir} && echo -e "Annulation de l'execution demandee ${dstdir}" && wok=0 && exit
48 test ${debug} -eq 1 && echo -e "testdir: Chemin de travail choisi : ${dstdir}"
49 done
50 cd "${dstdir}"
51}
52function solo()
53{
54 find . -type f -maxdepth 1 -iregex '.*\.[Mm][Pp]3' | while read FICH
55 do
56 gainonfile "$FICH"
57 done
58}
59function exectype()
60{
61 case "$type" in
62 solo)
63 test ${bavard} -eq 1 && echo -e "Traitement solo ${PWD}"
64 solo;;
65 album)
66 test ${bavard} -eq 1 && echo -e "Traitement album ${PWD}"
67 gainondir;;
68 *) echo -e "Type ($type) inconnu, pas de traitement";;
69 esac
70
71}
72############## MAIN ################
73
74# S'il n'y a aucun parametre, sortie de la commande en invoquant l'affichage de l'aide
75test -z "$1" && $0 -h && exit 1
76lcparam="$@"
77nbparam="$#"
78#echo -e "$?"
79#echo -e "$-"
80cpid="$$"
81#echo -e "$!"
82
83until [ -f "$1" ] || [ -d "$1" ]
84do
85 case "$1" in
86 -muet)
87 muet=1;;
88 -debug)
89 debug=1;;
90 -t) shift;
91 type="$1";;
92 -h) echo -e "\nusage:\n
93$0 [-muet -v] fichier_1 fichier_n
94$0 [-muet -v -r] repertoire_1 repertoire_n
95$0 [-muet -v -r -t album|solo ] repertoire_1 repertoire_n
96
97Formats possible en entree sont : mp3
98Formats possible en sortie sont : mp3
99";exit;;
100 -v)
101 bavard=1;;
102 -r)
103 recursif=1;;
104 *) # Tout les parametres sont passes, ceux-ci devraient etre des fichiers ou dossiers
105 if [ -f $1 ]
106 then typesrc="f"
107 elif [ -d $1 ]
108 then typesrc="d"
109 else
110 echo -e "Ce n'est pas un fichier, ni un dossier, c'est quoi ce binz !!!"
111 exit
112 fi
113 ;;
114 esac
115 shift
116done
117
118# Lire les valeurs enregistrees
119test ${bavard} -eq 1 && echo -e "Lecture des parametres : $(kde-config --localprefix)/share/config/mp3gainrc"
120source "$(kde-config --localprefix)/share/config/mp3gainrc"
121
122# sauvegarde des variables seulement en mode normal
123test $muet -eq 0 &&
124(
125test ${bavard} -eq 1 && echo -e "Enregistrement des parametres : $(kde-config --localprefix)/share/config/mp3gainrc"
126echo "dstdir=${dstdir}" > $(kde-config --localprefix)/share/config/mp3gainrc
127echo "tmpdir=${tmpdir}" >> $(kde-config --localprefix)/share/config/mp3gainrc
128echo "suffix=${suffix}" >> $(kde-config --localprefix)/share/config/mp3gainrc
129)
130until [ -z "$1" ] # Tant qu'il y a des parametres...
131do
132 if [ -f "$1" ] # Fichiers
133 then
134 # MP3
135 if [ "$(echo $1|sed 's/\.[Mm][Pp]3$//g')" != "$1" ]
136 then
137 gainonfile "$1"
138 fi
139 fi
140
141 if [ -d "$1" ] # Repertoire
142 then
143 cd "$1" # on se deplace dans le repertoire
144 CDIR="$PWD"
145 export EXTRABASE=$(basename "$PWD") # nom du repertoire sans le chemin
146
147 if [ $recursif = 0 ]
148 then
149 echo -e "Traitement (non recursif) de $PWD"
150 testdir "$PWD"
151 test $wok -eq 0 && echo -e "Impossible d'ecrire dans le repertoire : ${PWD}" && exit
152 test ${bavard} -eq 1 && echo -e "chemin apres test ${dstdir}"
153 exectype
154
155 else
156 echo -e "Traitement (recursif) de $PWD"
157 find . -type d | while read DICH # Cherche tout les sous-repertoires
158 do # debut de la recursion dans le repertoire
159 curdir="${CDIR}/${DICH}"
160 test ${bavard} -eq 1 && echo -e "Lancemment de mp3gain sur ${curdir}"
161 testdir "${curdir}"
162 test $wok -eq 0 && echo -e "Impossible d'ecrire dans le repertoire : $PWD" && exit
163 test ${bavard} -eq 1 && echo -e "chemin apres testdir $dstdir"
164 exectype
165 done
166 fi
167
168 fi
169shift
170done
171test ${bavard} -eq 1 && echo -e "mp3gain termine (PPID:${PPID} PID:${cpid}) en ${SECONDS}s !\n"
172test ${bavard} -eq 0 && echo -e "mp3gain termine!\n"
173test $muet -eq 0 && kdialog --msgbox "mp3gain termine (PID:${cpid}) en ${SECONDS}s !"
174test $muet -eq 1 && kdialog --passivepopup "mp3gain termine (PID:${cpid}) en ${SECONDS}s !" 3 &
175exit
0176
=== added file 'mpc2mp3.sh'
--- mpc2mp3.sh 1970-01-01 00:00:00 +0000
+++ mpc2mp3.sh 2009-03-16 19:22:21 +0000
@@ -0,0 +1,19 @@
1#!/bin/bash
2# mpc2mp3.sh - By pmd - http://pmdz.info
3# But : Convertir des fichiers mpc vers mp3
4# Paquets requis : mpc123 lame
5# Licence : http://creativecommons.org/licenses/by-nc-sa/2.0/fr/
6# Paternité - Pas d'Utilisation Commerciale - Partage des Conditions Initiales à l'Identique
7
8# Pour tous les fichiers se terminant par .mpc
9for i in *.mpc
10do
11# mpc vers wav
12x=`echo "$i"|sed -e 's/.mpc/.wav/'`
13mpc123 -w "$x" "$i"
14y=`echo "$i"|sed -e 's/.mpc/.mp3/'`
15# wav vers mp3
16lame -h -b 192 "$x" "$y"
17rm "$x"
18rm "$i"
19done
020
=== added file 'ogg2mp3.sh'
--- ogg2mp3.sh 1970-01-01 00:00:00 +0000
+++ ogg2mp3.sh 2009-03-16 19:22:21 +0000
@@ -0,0 +1,19 @@
1#!/bin/bash
2# ogg2mp3.sh - By pmd - http://pmdz.info
3# But : Convertir des fichiers ogg vers mp3
4# Paquets requis : vorbis-tools lame
5# Licence : http://creativecommons.org/licenses/by-nc-sa/2.0/fr/
6# Paternité - Pas d'Utilisation Commerciale - Partage des Conditions Initiales à l'Identique
7
8# Pour tous les fichiers se terminant par .ogg
9for i in *.ogg;
10do
11# ogg vers wav
12x=`echo "$i"|sed -e 's/.ogg/.wav/'`
13y=`echo "$i"|sed -e 's/.ogg/.mp3/'`
14oggdec -o "$x" "$i"
15# wav vers mp3
16lame -h -b 192 "$x" "$y"
17rm "$x"
18rm "$i"
19done
020
=== added file 'playdir'
--- playdir 1970-01-01 00:00:00 +0000
+++ playdir 2009-03-13 05:36:10 +0000
@@ -0,0 +1,22 @@
1#!/bin/bash
2#
3# Auteur : Juzan Jean-Michel
4#
5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; either version 2 of the License, or
8# (at your option) any later version.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program; if not, write to the Free Software
17# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18# MA 02110-1301, USA.
19#
20# Joue l'un parès l'autre tous les fichiers mp3 du repertoire
21#
22for i in *.mp3 do ; play "$i" ; done
023
=== added file 'wma2mp3.sh'
--- wma2mp3.sh 1970-01-01 00:00:00 +0000
+++ wma2mp3.sh 2009-03-16 19:22:21 +0000
@@ -0,0 +1,19 @@
1#!/bin/bash
2# wma2mp3.sh - By pmd - http://pmdz.info
3# But : Convertir des fichiers wma vers mp3
4# Paquets requis : mplayer lame
5# Licence : http://creativecommons.org/licenses/by-nc-sa/2.0/fr/
6# Paternité - Pas d'Utilisation Commerciale - Partage des Conditions Initiales à l'Identique
7
8# Pour tous les fichiers se terminant par .wma
9for i in *.wma;
10do
11# m4a vers wav
12x=`echo "$i"|sed -e 's/.wma/.wav/'`
13y=`echo "$i"|sed -e 's/.wma/.mp3/'`
14mplayer "$i" -ao pcm:file="$x";
15# wav vers mp3
16lame -h -b 192 "$x" "$y"
17rm "$x"
18rm "$i"
19done

Subscribers

People subscribed via source and target branches

to all changes: