generated from pavel.muhortov/template-bash
	add publisher.sh
This commit is contained in:
		
							parent
							
								
									a0cd99d544
								
							
						
					
					
						commit
						27dc242751
					
				
							
								
								
									
										525
									
								
								publisher-template-page-1007.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										525
									
								
								publisher-template-page-1007.xml
									
									
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,525 @@ | ||||||
|  | <?xml version="1.0" encoding="UTF-8"?> | ||||||
|  | <methodCall><methodName>wp.editPage</methodName> | ||||||
|  | 	<params> | ||||||
|  | 		<param><value>1</value></param> | ||||||
|  | 		<param><value>wpeditpageid</value></param> | ||||||
|  | 		<param><value>wpxmlrpcuser</value></param> | ||||||
|  | 		<param><value>wpxmlrpcpass</value></param> | ||||||
|  | 		<param><value><struct> | ||||||
|  | 			<member><name>dateCreated</name><value><dateTime.iso8601>wpeditdateis</dateTime.iso8601></value></member> | ||||||
|  | 			<member><name>userid</name><value><string>wpedituserid</string></value></member> | ||||||
|  | 			<member><name>page_id</name><value><int>wpeditpageid</int></value></member> | ||||||
|  | 			<member><name>page_status</name><value><string>publish</string></value></member> | ||||||
|  | 			<member><name>description</name><value><string> | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 				<!-- wp:heading {"level":3} --><h3>Now</h3><!-- /wp:heading --> | ||||||
|  | 				<!-- wp:embed {"url":"youtubelink","type":"video","providerNameSlug":"youtube", | ||||||
|  | 					"responsive":true,"className":"wp-embed-aspect-4-3 wp-has-aspect-ratio"} --> | ||||||
|  | 					<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"> | ||||||
|  | 					<div class="wp-block-embed__wrapper"> | ||||||
|  | 					youtubelink | ||||||
|  | 					</div></figure><!-- /wp:embed --> | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 				<!-- wp:heading {"level":3} --><h3>Yesterday</h3><!-- /wp:heading --> | ||||||
|  | 				<!-- wp:uagb/tabs {"block_id":"yesterday", | ||||||
|  | 					"tabHeaders":["currentdp01[0]", | ||||||
|  | 											"currentdp02[0]", | ||||||
|  | 											"currentdp04[0]", | ||||||
|  | 											"currentdp05[0]", | ||||||
|  | 											"currentdp11[0]", | ||||||
|  | 											"currentdp12[0]"],"tabActive":5,"activeTabBgColor":"#4b4b4b", | ||||||
|  | 					"tabTitleLeftMargin":1,"tabTitleRightMargin":1,"tabTitleTopMargin":1,"tabTitleBottomMargin":1} --> | ||||||
|  | 				<div class="wp-block-uagb-tabs uagb-block-yesterday uagb-tabs__wrap uagb-tabs__hstyle1-desktop uagb-tabs__vstyle6-tablet uagb-tabs__vstyle6-mobile" data-tab-active="0"> | ||||||
|  | 				<ul class="uagb-tabs__panel uagb-tabs__align-left"><li class="uagb-tab uagb-tabs__active"> | ||||||
|  | 				<a href="#uagb-tabs__tab0" class="uagb-tabs-list uagb-tabs__icon-position-left" data-tab="0"> | ||||||
|  | 				<span>currentdp01[0]</span></a></li><li class="uagb-tab "> | ||||||
|  | 				<a href="#uagb-tabs__tab1" class="uagb-tabs-list uagb-tabs__icon-position-left" data-tab="1"> | ||||||
|  | 				<span>currentdp02[0]</span></a></li><li class="uagb-tab "> | ||||||
|  | 				<a href="#uagb-tabs__tab2" class="uagb-tabs-list uagb-tabs__icon-position-left" data-tab="2"> | ||||||
|  | 				<span>currentdp04[0]</span></a></li><li class="uagb-tab "> | ||||||
|  | 				<a href="#uagb-tabs__tab3" class="uagb-tabs-list uagb-tabs__icon-position-left" data-tab="3"> | ||||||
|  | 				<span>currentdp05[0]</span></a></li><li class="uagb-tab "> | ||||||
|  | 				<a href="#uagb-tabs__tab4" class="uagb-tabs-list uagb-tabs__icon-position-left" data-tab="4"> | ||||||
|  | 				<span>currentdp11[0]</span></a></li><li class="uagb-tab "> | ||||||
|  | 				<a href="#uagb-tabs__tab5" class="uagb-tabs-list uagb-tabs__icon-position-left" data-tab="5"> | ||||||
|  | 				<span>currentdp12[0]</span></a></li></ul> | ||||||
|  | 
 | ||||||
|  | 					<div class="uagb-tabs__body-wrap"> | ||||||
|  | 					<!-- wp:uagb/tabs-child {"block_id":"daypoint01", | ||||||
|  | 						"header":"currentdp01[0]","tabActive":5, | ||||||
|  | 						"tabHeaders":["currentdp01[0]", | ||||||
|  | 												"currentdp02[0]", | ||||||
|  | 												"currentdp04[0]", | ||||||
|  | 												"currentdp05[0]", | ||||||
|  | 												"currentdp11[0]","wp1tab"]} --> | ||||||
|  | 					<div class="wp-block-uagb-tabs-child uagb-tabs__body-container uagb-tabs__inner-tab uagb-inner-tab-0"> | ||||||
|  | 					<div class="uagb-blocks__daypoint01 uagb-tabs__body" aria-labelledby="uagb-tabs__tab0"> | ||||||
|  | 					<!-- wp:video {"id":1036} --><figure class="wp-block-video"> | ||||||
|  | 					<video controls loop src="currentdp01[1]"> | ||||||
|  | 					</video></figure><!-- /wp:video --></div></div><!-- /wp:uagb/tabs-child --> | ||||||
|  | 
 | ||||||
|  | 					<!-- wp:uagb/tabs-child {"block_id":"daypoint02","id":1, | ||||||
|  | 						"header":"currentdp02[0]","tabActive":5, | ||||||
|  | 						"tabHeaders":["currentdp01[0]", | ||||||
|  | 												"currentdp02[0]", | ||||||
|  | 												"currentdp04[0]", | ||||||
|  | 												"currentdp05[0]", | ||||||
|  | 												"currentdp11[0]","wp1tab"]} --> | ||||||
|  | 					<div class="wp-block-uagb-tabs-child uagb-tabs__body-container uagb-tabs__inner-tab uagb-inner-tab-1"> | ||||||
|  | 					<div class="uagb-blocks__daypoint02 uagb-tabs__body" aria-labelledby="uagb-tabs__tab1"> | ||||||
|  | 					<!-- wp:video {"id":1041} --><figure class="wp-block-video"> | ||||||
|  | 					<video controls loop src="currentdp02[1]"> | ||||||
|  | 					</video></figure><!-- /wp:video --></div></div><!-- /wp:uagb/tabs-child --> | ||||||
|  | 
 | ||||||
|  | 					<!-- wp:uagb/tabs-child {"block_id":"daypoint04","id":2, | ||||||
|  | 						"header":"currentdp04[0]","tabActive":5, | ||||||
|  | 						"tabHeaders":["currentdp01[0]", | ||||||
|  | 												"currentdp02[0]", | ||||||
|  | 												"currentdp04[0]", | ||||||
|  | 												"currentdp05[0]", | ||||||
|  | 												"currentdp11[0]","wp1tab"]} --> | ||||||
|  | 					<div class="wp-block-uagb-tabs-child uagb-tabs__body-container uagb-tabs__inner-tab uagb-inner-tab-2"> | ||||||
|  | 					<div class="uagb-blocks__daypoint04 uagb-tabs__body" aria-labelledby="uagb-tabs__tab2"> | ||||||
|  | 					<!-- wp:video {"id":1046} --><figure class="wp-block-video"> | ||||||
|  | 					<video controls loop src="currentdp04[1]"> | ||||||
|  | 					</video></figure><!-- /wp:video --></div></div><!-- /wp:uagb/tabs-child --> | ||||||
|  | 
 | ||||||
|  | 					<!-- wp:uagb/tabs-child {"block_id":"daypoint05","id":3, | ||||||
|  | 						"header":"currentdp05[0]","tabActive":5, | ||||||
|  | 						"tabHeaders":["currentdp01[0]", | ||||||
|  | 												"currentdp02[0]", | ||||||
|  | 												"currentdp04[0]", | ||||||
|  | 												"currentdp05[0]", | ||||||
|  | 												"currentdp11[0]","wp1tab"]} --> | ||||||
|  | 					<div class="wp-block-uagb-tabs-child uagb-tabs__body-container uagb-tabs__inner-tab uagb-inner-tab-3"> | ||||||
|  | 					<div class="uagb-blocks__daypoint05 uagb-tabs__body" aria-labelledby="uagb-tabs__tab3"> | ||||||
|  | 					<!-- wp:video {"id":1051} --><figure class="wp-block-video"> | ||||||
|  | 					<video controls loop src="currentdp05[1]"> | ||||||
|  | 					</video></figure><!-- /wp:video --></div></div><!-- /wp:uagb/tabs-child --> | ||||||
|  | 
 | ||||||
|  | 					<!-- wp:uagb/tabs-child {"block_id":"daypoint11","id":4, | ||||||
|  | 						"header":"currentdp11[0]","tabActive":5, | ||||||
|  | 						"tabHeaders":["currentdp01[0]", | ||||||
|  | 												"currentdp02[0]", | ||||||
|  | 												"currentdp04[0]", | ||||||
|  | 												"currentdp05[0]", | ||||||
|  | 												"currentdp11[0]","wp1tab"]} --> | ||||||
|  | 					<div class="wp-block-uagb-tabs-child uagb-tabs__body-container uagb-tabs__inner-tab uagb-inner-tab-4"> | ||||||
|  | 					<div class="uagb-blocks__daypoint11 uagb-tabs__body" aria-labelledby="uagb-tabs__tab4"> | ||||||
|  | 					<!-- wp:video {"id":1056} --><figure class="wp-block-video"> | ||||||
|  | 					<video controls loop src="currentdp11[1]"> | ||||||
|  | 					</video></figure><!-- /wp:video --></div></div><!-- /wp:uagb/tabs-child --> | ||||||
|  | 
 | ||||||
|  | 					<!-- wp:uagb/tabs-child {"block_id":"daypoint12","id":5, | ||||||
|  | 						"header":"currentdp12[0]","tabActive":5, | ||||||
|  | 						"tabHeaders":["currentdp01[0]", | ||||||
|  | 												"currentdp02[0]", | ||||||
|  | 												"currentdp04[0]", | ||||||
|  | 												"currentdp05[0]", | ||||||
|  | 												"currentdp11[0]","wp1tab"]} --> | ||||||
|  | 					<div class="wp-block-uagb-tabs-child uagb-tabs__body-container uagb-tabs__inner-tab uagb-inner-tab-5"> | ||||||
|  | 					<div class="uagb-blocks__daypoint12 uagb-tabs__body" aria-labelledby="uagb-tabs__tab5"> | ||||||
|  | 					<!-- wp:video {"id":1061} --><figure class="wp-block-video"> | ||||||
|  | 					<video controls loop src="currentdp12[1]"> | ||||||
|  | 					</video></figure><!-- /wp:video --></div></div><!-- /wp:uagb/tabs-child --></div></div> | ||||||
|  | 					<!-- /wp:uagb/tabs --> | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 				<!-- wp:heading {"level":3} --><h3>Last week</h3><!-- /wp:heading --> | ||||||
|  | 				<!-- wp:uagb/tabs {"block_id":"lastweek", | ||||||
|  | 					"tabHeaders":["currentwp01[0]", | ||||||
|  | 											"currentwp02[0]", | ||||||
|  | 											"currentwp04[0]", | ||||||
|  | 											"currentwp05[0]", | ||||||
|  | 											"currentwp11[0]", | ||||||
|  | 											"currentwp12[0]"],"tabActive":5,"activeTabBgColor":"#4b4b4b", | ||||||
|  | 					"tabTitleLeftMargin":1,"tabTitleRightMargin":1,"tabTitleTopMargin":1,"tabTitleBottomMargin":1} --> | ||||||
|  | 				<div class="wp-block-uagb-tabs uagb-block-lastweek uagb-tabs__wrap uagb-tabs__hstyle1-desktop uagb-tabs__vstyle6-tablet uagb-tabs__vstyle6-mobile" data-tab-active="0"> | ||||||
|  | 				<ul class="uagb-tabs__panel uagb-tabs__align-left"><li class="uagb-tab uagb-tabs__active"> | ||||||
|  | 				<a href="#uagb-tabs__tab0" class="uagb-tabs-list uagb-tabs__icon-position-left" data-tab="0"> | ||||||
|  | 				<span>currentwp01[0]</span></a></li><li class="uagb-tab "> | ||||||
|  | 				<a href="#uagb-tabs__tab1" class="uagb-tabs-list uagb-tabs__icon-position-left" data-tab="1"> | ||||||
|  | 				<span>currentwp02[0]</span></a></li><li class="uagb-tab "> | ||||||
|  | 				<a href="#uagb-tabs__tab2" class="uagb-tabs-list uagb-tabs__icon-position-left" data-tab="2"> | ||||||
|  | 				<span>currentwp04[0]</span></a></li><li class="uagb-tab "> | ||||||
|  | 				<a href="#uagb-tabs__tab3" class="uagb-tabs-list uagb-tabs__icon-position-left" data-tab="3"> | ||||||
|  | 				<span>currentwp05[0]</span></a></li><li class="uagb-tab "> | ||||||
|  | 				<a href="#uagb-tabs__tab4" class="uagb-tabs-list uagb-tabs__icon-position-left" data-tab="4"> | ||||||
|  | 				<span>currentwp11[0]</span></a></li><li class="uagb-tab "> | ||||||
|  | 				<a href="#uagb-tabs__tab5" class="uagb-tabs-list uagb-tabs__icon-position-left" data-tab="5"> | ||||||
|  | 				<span>currentwp12[0]</span></a></li></ul> | ||||||
|  | 
 | ||||||
|  | 					<div class="uagb-tabs__body-wrap"> | ||||||
|  | 					<!-- wp:uagb/tabs-child {"block_id":"weekpoint01", | ||||||
|  | 						"header":"currentwp01[0]","tabActive":5, | ||||||
|  | 						"tabHeaders":["currentwp01[0]", | ||||||
|  | 												"currentwp02[0]", | ||||||
|  | 												"currentwp04[0]", | ||||||
|  | 												"currentwp05[0]", | ||||||
|  | 												"currentwp11[0]","wp1tab"]} --> | ||||||
|  | 					<div class="wp-block-uagb-tabs-child uagb-tabs__body-container uagb-tabs__inner-tab uagb-inner-tab-0"> | ||||||
|  | 					<div class="uagb-blocks__weekpoint01 uagb-tabs__body" aria-labelledby="uagb-tabs__tab0"> | ||||||
|  | 					<!-- wp:video {"id":1036} --><figure class="wp-block-video"> | ||||||
|  | 					<video controls loop src="currentwp01[1]"> | ||||||
|  | 					</video></figure><!-- /wp:video --></div></div><!-- /wp:uagb/tabs-child --> | ||||||
|  | 
 | ||||||
|  | 					<!-- wp:uagb/tabs-child {"block_id":"weekpoint02","id":1, | ||||||
|  | 						"header":"currentwp02[0]","tabActive":5, | ||||||
|  | 						"tabHeaders":["currentwp01[0]", | ||||||
|  | 												"currentwp02[0]", | ||||||
|  | 												"currentwp04[0]", | ||||||
|  | 												"currentwp05[0]", | ||||||
|  | 												"currentwp11[0]","wp1tab"]} --> | ||||||
|  | 					<div class="wp-block-uagb-tabs-child uagb-tabs__body-container uagb-tabs__inner-tab uagb-inner-tab-1"> | ||||||
|  | 					<div class="uagb-blocks__weekpoint02 uagb-tabs__body" aria-labelledby="uagb-tabs__tab1"> | ||||||
|  | 					<!-- wp:video {"id":1041} --><figure class="wp-block-video"> | ||||||
|  | 					<video controls loop src="currentwp02[1]"> | ||||||
|  | 					</video></figure><!-- /wp:video --></div></div><!-- /wp:uagb/tabs-child --> | ||||||
|  | 
 | ||||||
|  | 					<!-- wp:uagb/tabs-child {"block_id":"weekpoint04","id":2, | ||||||
|  | 						"header":"currentwp04[0]","tabActive":5, | ||||||
|  | 						"tabHeaders":["currentwp01[0]", | ||||||
|  | 												"currentwp02[0]", | ||||||
|  | 												"currentwp04[0]", | ||||||
|  | 												"currentwp05[0]", | ||||||
|  | 												"currentwp11[0]","wp1tab"]} --> | ||||||
|  | 					<div class="wp-block-uagb-tabs-child uagb-tabs__body-container uagb-tabs__inner-tab uagb-inner-tab-2"> | ||||||
|  | 					<div class="uagb-blocks__weekpoint04 uagb-tabs__body" aria-labelledby="uagb-tabs__tab2"> | ||||||
|  | 					<!-- wp:video {"id":1046} --><figure class="wp-block-video"> | ||||||
|  | 					<video controls loop src="currentwp04[1]"> | ||||||
|  | 					</video></figure><!-- /wp:video --></div></div><!-- /wp:uagb/tabs-child --> | ||||||
|  | 
 | ||||||
|  | 					<!-- wp:uagb/tabs-child {"block_id":"weekpoint05","id":3, | ||||||
|  | 						"header":"currentwp05[0]","tabActive":5, | ||||||
|  | 						"tabHeaders":["currentwp01[0]", | ||||||
|  | 												"currentwp02[0]", | ||||||
|  | 												"currentwp04[0]", | ||||||
|  | 												"currentwp05[0]", | ||||||
|  | 												"currentwp11[0]","wp1tab"]} --> | ||||||
|  | 					<div class="wp-block-uagb-tabs-child uagb-tabs__body-container uagb-tabs__inner-tab uagb-inner-tab-3"> | ||||||
|  | 					<div class="uagb-blocks__weekpoint05 uagb-tabs__body" aria-labelledby="uagb-tabs__tab3"> | ||||||
|  | 					<!-- wp:video {"id":1051} --><figure class="wp-block-video"> | ||||||
|  | 					<video controls loop src="currentwp05[1]"> | ||||||
|  | 					</video></figure><!-- /wp:video --></div></div><!-- /wp:uagb/tabs-child --> | ||||||
|  | 
 | ||||||
|  | 					<!-- wp:uagb/tabs-child {"block_id":"weekpoint11","id":4, | ||||||
|  | 						"header":"currentwp11[0]","tabActive":5, | ||||||
|  | 						"tabHeaders":["currentwp01[0]", | ||||||
|  | 												"currentwp02[0]", | ||||||
|  | 												"currentwp04[0]", | ||||||
|  | 												"currentwp05[0]", | ||||||
|  | 												"currentwp11[0]","wp1tab"]} --> | ||||||
|  | 					<div class="wp-block-uagb-tabs-child uagb-tabs__body-container uagb-tabs__inner-tab uagb-inner-tab-4"> | ||||||
|  | 					<div class="uagb-blocks__weekpoint11 uagb-tabs__body" aria-labelledby="uagb-tabs__tab4"> | ||||||
|  | 					<!-- wp:video {"id":1056} --><figure class="wp-block-video"> | ||||||
|  | 					<video controls loop src="currentwp11[1]"> | ||||||
|  | 					</video></figure><!-- /wp:video --></div></div><!-- /wp:uagb/tabs-child --> | ||||||
|  | 
 | ||||||
|  | 					<!-- wp:uagb/tabs-child {"block_id":"weekpoint12","id":5, | ||||||
|  | 						"header":"currentwp12[0]","tabActive":5, | ||||||
|  | 						"tabHeaders":["currentwp01[0]", | ||||||
|  | 												"currentwp02[0]", | ||||||
|  | 												"currentwp04[0]", | ||||||
|  | 												"currentwp05[0]", | ||||||
|  | 												"currentwp11[0]","wp1tab"]} --> | ||||||
|  | 					<div class="wp-block-uagb-tabs-child uagb-tabs__body-container uagb-tabs__inner-tab uagb-inner-tab-5"> | ||||||
|  | 					<div class="uagb-blocks__weekpoint12 uagb-tabs__body" aria-labelledby="uagb-tabs__tab5"> | ||||||
|  | 					<!-- wp:video {"id":1061} --><figure class="wp-block-video"> | ||||||
|  | 					<video controls loop src="currentwp12[1]"> | ||||||
|  | 					</video></figure><!-- /wp:video --></div></div><!-- /wp:uagb/tabs-child --></div></div> | ||||||
|  | 					<!-- /wp:uagb/tabs --> | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 				<!-- wp:heading {"level":3} --><h3>Last month</h3><!-- /wp:heading --> | ||||||
|  | 				<!-- wp:uagb/tabs {"block_id":"lastmonth", | ||||||
|  | 					"tabHeaders":["currentmp01[0]", | ||||||
|  | 											"currentmp02[0]", | ||||||
|  | 											"currentmp04[0]", | ||||||
|  | 											"currentmp05[0]", | ||||||
|  | 											"currentmp11[0]", | ||||||
|  | 											"currentmp12[0]"],"tabActive":5,"activeTabBgColor":"#4b4b4b", | ||||||
|  | 					"tabTitleLeftMargin":1,"tabTitleRightMargin":1,"tabTitleTopMargin":1,"tabTitleBottomMargin":1} --> | ||||||
|  | 				<div class="wp-block-uagb-tabs uagb-block-lastmonth uagb-tabs__wrap uagb-tabs__hstyle1-desktop uagb-tabs__vstyle6-tablet uagb-tabs__vstyle6-mobile" data-tab-active="0"> | ||||||
|  | 				<ul class="uagb-tabs__panel uagb-tabs__align-left"><li class="uagb-tab uagb-tabs__active"> | ||||||
|  | 				<a href="#uagb-tabs__tab0" class="uagb-tabs-list uagb-tabs__icon-position-left" data-tab="0"> | ||||||
|  | 				<span>currentmp01[0]</span></a></li><li class="uagb-tab "> | ||||||
|  | 				<a href="#uagb-tabs__tab1" class="uagb-tabs-list uagb-tabs__icon-position-left" data-tab="1"> | ||||||
|  | 				<span>currentmp02[0]</span></a></li><li class="uagb-tab "> | ||||||
|  | 				<a href="#uagb-tabs__tab2" class="uagb-tabs-list uagb-tabs__icon-position-left" data-tab="2"> | ||||||
|  | 				<span>currentmp04[0]</span></a></li><li class="uagb-tab "> | ||||||
|  | 				<a href="#uagb-tabs__tab3" class="uagb-tabs-list uagb-tabs__icon-position-left" data-tab="3"> | ||||||
|  | 				<span>currentmp05[0]</span></a></li><li class="uagb-tab "> | ||||||
|  | 				<a href="#uagb-tabs__tab4" class="uagb-tabs-list uagb-tabs__icon-position-left" data-tab="4"> | ||||||
|  | 				<span>currentmp11[0]</span></a></li><li class="uagb-tab "> | ||||||
|  | 				<a href="#uagb-tabs__tab5" class="uagb-tabs-list uagb-tabs__icon-position-left" data-tab="5"> | ||||||
|  | 				<span>currentmp12[0]</span></a></li></ul> | ||||||
|  | 
 | ||||||
|  | 					<div class="uagb-tabs__body-wrap"> | ||||||
|  | 					<!-- wp:uagb/tabs-child {"block_id":"monthpoint01", | ||||||
|  | 						"header":"currentmp01[0]","tabActive":5, | ||||||
|  | 						"tabHeaders":["currentmp01[0]", | ||||||
|  | 												"currentmp02[0]", | ||||||
|  | 												"currentmp04[0]", | ||||||
|  | 												"currentmp05[0]", | ||||||
|  | 												"currentmp11[0]","mp1tab"]} --> | ||||||
|  | 					<div class="wp-block-uagb-tabs-child uagb-tabs__body-container uagb-tabs__inner-tab uagb-inner-tab-0"> | ||||||
|  | 					<div class="uagb-blocks__monthpoint01 uagb-tabs__body" aria-labelledby="uagb-tabs__tab0"> | ||||||
|  | 					<!-- wp:video {"id":1037} --><figure class="wp-block-video"> | ||||||
|  | 					<video controls loop src="currentmp01[1]"> | ||||||
|  | 					</video></figure><!-- /wp:video --></div></div><!-- /wp:uagb/tabs-child --> | ||||||
|  | 
 | ||||||
|  | 					<!-- wp:uagb/tabs-child {"block_id":"monthpoint02","id":1, | ||||||
|  | 						"header":"currentmp02[0]","tabActive":5, | ||||||
|  | 						"tabHeaders":["currentmp01[0]", | ||||||
|  | 												"currentmp02[0]", | ||||||
|  | 												"currentmp04[0]", | ||||||
|  | 												"currentmp05[0]", | ||||||
|  | 												"currentmp11[0]","mp1tab"]} --> | ||||||
|  | 					<div class="wp-block-uagb-tabs-child uagb-tabs__body-container uagb-tabs__inner-tab uagb-inner-tab-1"> | ||||||
|  | 					<div class="uagb-blocks__monthpoint02 uagb-tabs__body" aria-labelledby="uagb-tabs__tab1"> | ||||||
|  | 					<!-- wp:video {"id":1042} --><figure class="wp-block-video"> | ||||||
|  | 					<video controls loop src="currentmp02[1]"> | ||||||
|  | 					</video></figure><!-- /wp:video --></div></div><!-- /wp:uagb/tabs-child --> | ||||||
|  | 
 | ||||||
|  | 					<!-- wp:uagb/tabs-child {"block_id":"monthpoint04","id":2, | ||||||
|  | 						"header":"currentmp04[0]","tabActive":5, | ||||||
|  | 						"tabHeaders":["currentmp01[0]", | ||||||
|  | 												"currentmp02[0]", | ||||||
|  | 												"currentmp04[0]", | ||||||
|  | 												"currentmp05[0]", | ||||||
|  | 												"currentmp11[0]","mp1tab"]} --> | ||||||
|  | 					<div class="wp-block-uagb-tabs-child uagb-tabs__body-container uagb-tabs__inner-tab uagb-inner-tab-2"> | ||||||
|  | 					<div class="uagb-blocks__monthpoint04 uagb-tabs__body" aria-labelledby="uagb-tabs__tab2"> | ||||||
|  | 					<!-- wp:video {"id":1047} --><figure class="wp-block-video"> | ||||||
|  | 					<video controls loop src="currentmp04[1]"> | ||||||
|  | 					</video></figure><!-- /wp:video --></div></div><!-- /wp:uagb/tabs-child --> | ||||||
|  | 
 | ||||||
|  | 					<!-- wp:uagb/tabs-child {"block_id":"monthpoint05","id":3, | ||||||
|  | 						"header":"currentmp05[0]","tabActive":5, | ||||||
|  | 						"tabHeaders":["currentmp01[0]", | ||||||
|  | 												"currentmp02[0]", | ||||||
|  | 												"currentmp04[0]", | ||||||
|  | 												"currentmp05[0]", | ||||||
|  | 												"currentmp11[0]","mp1tab"]} --> | ||||||
|  | 					<div class="wp-block-uagb-tabs-child uagb-tabs__body-container uagb-tabs__inner-tab uagb-inner-tab-3"> | ||||||
|  | 					<div class="uagb-blocks__monthpoint05 uagb-tabs__body" aria-labelledby="uagb-tabs__tab3"> | ||||||
|  | 					<!-- wp:video {"id":1052} --><figure class="wp-block-video"> | ||||||
|  | 					<video controls loop src="currentmp05[1]"> | ||||||
|  | 					</video></figure><!-- /wp:video --></div></div><!-- /wp:uagb/tabs-child --> | ||||||
|  | 
 | ||||||
|  | 					<!-- wp:uagb/tabs-child {"block_id":"monthpoint11","id":4, | ||||||
|  | 						"header":"currentmp11[0]","tabActive":5, | ||||||
|  | 						"tabHeaders":["currentmp01[0]", | ||||||
|  | 												"currentmp02[0]", | ||||||
|  | 												"currentmp04[0]", | ||||||
|  | 												"currentmp05[0]", | ||||||
|  | 												"currentmp11[0]","mp1tab"]} --> | ||||||
|  | 					<div class="wp-block-uagb-tabs-child uagb-tabs__body-container uagb-tabs__inner-tab uagb-inner-tab-4"> | ||||||
|  | 					<div class="uagb-blocks__monthpoint11 uagb-tabs__body" aria-labelledby="uagb-tabs__tab4"> | ||||||
|  | 					<!-- wp:video {"id":1057} --><figure class="wp-block-video"> | ||||||
|  | 					<video controls loop src="currentmp11[1]"> | ||||||
|  | 					</video></figure><!-- /wp:video --></div></div><!-- /wp:uagb/tabs-child --> | ||||||
|  | 
 | ||||||
|  | 					<!-- wp:uagb/tabs-child {"block_id":"monthpoint12","id":5, | ||||||
|  | 						"header":"currentmp12[0]","tabActive":5, | ||||||
|  | 						"tabHeaders":["currentmp01[0]", | ||||||
|  | 												"currentmp02[0]", | ||||||
|  | 												"currentmp04[0]", | ||||||
|  | 												"currentmp05[0]", | ||||||
|  | 												"currentmp11[0]","mp1tab"]} --> | ||||||
|  | 					<div class="wp-block-uagb-tabs-child uagb-tabs__body-container uagb-tabs__inner-tab uagb-inner-tab-5"> | ||||||
|  | 					<div class="uagb-blocks__monthpoint12 uagb-tabs__body" aria-labelledby="uagb-tabs__tab5"> | ||||||
|  | 					<!-- wp:video {"id":1062} --><figure class="wp-block-video"> | ||||||
|  | 					<video controls loop src="currentmp12[1]"> | ||||||
|  | 					</video></figure><!-- /wp:video --></div></div><!-- /wp:uagb/tabs-child --></div></div> | ||||||
|  | 					<!-- /wp:uagb/tabs --> | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 				<!-- wp:heading {"level":3} --><h3>Last year</h3><!-- /wp:heading --> | ||||||
|  | 				<!-- wp:uagb/tabs {"block_id":"lastyear", | ||||||
|  | 					"tabHeaders":["currentyp01[0]", | ||||||
|  | 											"currentyp02[0]", | ||||||
|  | 											"currentyp04[0]", | ||||||
|  | 											"currentyp05[0]", | ||||||
|  | 											"currentyp11[0]", | ||||||
|  | 											"currentyp12[0]"],"tabActive":5,"activeTabBgColor":"#4b4b4b", | ||||||
|  | 					"tabTitleLeftMargin":1,"tabTitleRightMargin":1,"tabTitleTopMargin":1,"tabTitleBottomMargin":1} --> | ||||||
|  | 				<div class="wp-block-uagb-tabs uagb-block-lastyear uagb-tabs__wrap uagb-tabs__hstyle1-desktop uagb-tabs__vstyle6-tablet uagb-tabs__vstyle6-mobile" data-tab-active="0"> | ||||||
|  | 				<ul class="uagb-tabs__panel uagb-tabs__align-left"><li class="uagb-tab uagb-tabs__active"> | ||||||
|  | 				<a href="#uagb-tabs__tab0" class="uagb-tabs-list uagb-tabs__icon-position-left" data-tab="0"> | ||||||
|  | 				<span>currentyp01[0]</span></a></li><li class="uagb-tab "> | ||||||
|  | 				<a href="#uagb-tabs__tab1" class="uagb-tabs-list uagb-tabs__icon-position-left" data-tab="1"> | ||||||
|  | 				<span>currentyp02[0]</span></a></li><li class="uagb-tab "> | ||||||
|  | 				<a href="#uagb-tabs__tab2" class="uagb-tabs-list uagb-tabs__icon-position-left" data-tab="2"> | ||||||
|  | 				<span>currentyp04[0]</span></a></li><li class="uagb-tab "> | ||||||
|  | 				<a href="#uagb-tabs__tab3" class="uagb-tabs-list uagb-tabs__icon-position-left" data-tab="3"> | ||||||
|  | 				<span>currentyp05[0]</span></a></li><li class="uagb-tab "> | ||||||
|  | 				<a href="#uagb-tabs__tab4" class="uagb-tabs-list uagb-tabs__icon-position-left" data-tab="4"> | ||||||
|  | 				<span>currentyp11[0]</span></a></li><li class="uagb-tab "> | ||||||
|  | 				<a href="#uagb-tabs__tab5" class="uagb-tabs-list uagb-tabs__icon-position-left" data-tab="5"> | ||||||
|  | 				<span>currentyp12[0]</span></a></li></ul> | ||||||
|  | 
 | ||||||
|  | 					<div class="uagb-tabs__body-wrap"> | ||||||
|  | 					<!-- wp:uagb/tabs-child {"block_id":"yearpoint01", | ||||||
|  | 						"header":"currentyp01[0]","tabActive":5, | ||||||
|  | 						"tabHeaders":["currentyp01[0]", | ||||||
|  | 												"currentyp02[0]", | ||||||
|  | 												"currentyp04[0]", | ||||||
|  | 												"currentyp05[0]", | ||||||
|  | 												"currentyp11[0]","yp1tab"]} --> | ||||||
|  | 					<div class="wp-block-uagb-tabs-child uagb-tabs__body-container uagb-tabs__inner-tab uagb-inner-tab-0"> | ||||||
|  | 					<div class="uagb-blocks__yearpoint01 uagb-tabs__body" aria-labelledby="uagb-tabs__tab0"> | ||||||
|  | 					<!-- wp:video {"id":1038} --><figure class="wp-block-video"> | ||||||
|  | 					<video controls loop src="currentyp01[1]"> | ||||||
|  | 					</video></figure><!-- /wp:video --></div></div><!-- /wp:uagb/tabs-child --> | ||||||
|  | 
 | ||||||
|  | 					<!-- wp:uagb/tabs-child {"block_id":"yearpoint02","id":1, | ||||||
|  | 						"header":"currentyp02[0]","tabActive":5, | ||||||
|  | 						"tabHeaders":["currentyp01[0]", | ||||||
|  | 												"currentyp02[0]", | ||||||
|  | 												"currentyp04[0]", | ||||||
|  | 												"currentyp05[0]", | ||||||
|  | 												"currentyp11[0]","yp1tab"]} --> | ||||||
|  | 					<div class="wp-block-uagb-tabs-child uagb-tabs__body-container uagb-tabs__inner-tab uagb-inner-tab-1"> | ||||||
|  | 					<div class="uagb-blocks__yearpoint02 uagb-tabs__body" aria-labelledby="uagb-tabs__tab1"> | ||||||
|  | 					<!-- wp:video {"id":1043} --><figure class="wp-block-video"> | ||||||
|  | 					<video controls loop src="currentyp02[1]"> | ||||||
|  | 					</video></figure><!-- /wp:video --></div></div><!-- /wp:uagb/tabs-child --> | ||||||
|  | 
 | ||||||
|  | 					<!-- wp:uagb/tabs-child {"block_id":"yearpoint04","id":2, | ||||||
|  | 						"header":"currentyp04[0]","tabActive":5, | ||||||
|  | 						"tabHeaders":["currentyp01[0]", | ||||||
|  | 												"currentyp02[0]", | ||||||
|  | 												"currentyp04[0]", | ||||||
|  | 												"currentyp05[0]", | ||||||
|  | 												"currentyp11[0]","yp1tab"]} --> | ||||||
|  | 					<div class="wp-block-uagb-tabs-child uagb-tabs__body-container uagb-tabs__inner-tab uagb-inner-tab-2"> | ||||||
|  | 					<div class="uagb-blocks__yearpoint04 uagb-tabs__body" aria-labelledby="uagb-tabs__tab2"> | ||||||
|  | 					<!-- wp:video {"id":1048} --><figure class="wp-block-video"> | ||||||
|  | 					<video controls loop src="currentyp04[1]"> | ||||||
|  | 					</video></figure><!-- /wp:video --></div></div><!-- /wp:uagb/tabs-child --> | ||||||
|  | 
 | ||||||
|  | 					<!-- wp:uagb/tabs-child {"block_id":"yearpoint05","id":3, | ||||||
|  | 						"header":"currentyp05[0]","tabActive":5, | ||||||
|  | 						"tabHeaders":["currentyp01[0]", | ||||||
|  | 												"currentyp02[0]", | ||||||
|  | 												"currentyp04[0]", | ||||||
|  | 												"currentyp05[0]", | ||||||
|  | 												"currentyp11[0]","yp1tab"]} --> | ||||||
|  | 					<div class="wp-block-uagb-tabs-child uagb-tabs__body-container uagb-tabs__inner-tab uagb-inner-tab-3"> | ||||||
|  | 					<div class="uagb-blocks__yearpoint05 uagb-tabs__body" aria-labelledby="uagb-tabs__tab3"> | ||||||
|  | 					<!-- wp:video {"id":1053} --><figure class="wp-block-video"> | ||||||
|  | 					<video controls loop src="currentyp05[1]"> | ||||||
|  | 					</video></figure><!-- /wp:video --></div></div><!-- /wp:uagb/tabs-child --> | ||||||
|  | 
 | ||||||
|  | 					<!-- wp:uagb/tabs-child {"block_id":"yearpoint11","id":4, | ||||||
|  | 						"header":"currentyp11[0]","tabActive":5, | ||||||
|  | 						"tabHeaders":["currentyp01[0]", | ||||||
|  | 												"currentyp02[0]", | ||||||
|  | 												"currentyp04[0]", | ||||||
|  | 												"currentyp05[0]", | ||||||
|  | 												"currentyp11[0]","yp1tab"]} --> | ||||||
|  | 					<div class="wp-block-uagb-tabs-child uagb-tabs__body-container uagb-tabs__inner-tab uagb-inner-tab-4"> | ||||||
|  | 					<div class="uagb-blocks__yearpoint11 uagb-tabs__body" aria-labelledby="uagb-tabs__tab4"> | ||||||
|  | 					<!-- wp:video {"id":1058} --><figure class="wp-block-video"> | ||||||
|  | 					<video controls loop src="currentyp11[1]"> | ||||||
|  | 					</video></figure><!-- /wp:video --></div></div><!-- /wp:uagb/tabs-child --> | ||||||
|  | 
 | ||||||
|  | 					<!-- wp:uagb/tabs-child {"block_id":"yearpoint12","id":5, | ||||||
|  | 						"header":"currentyp12[0]","tabActive":5, | ||||||
|  | 						"tabHeaders":["currentyp01[0]", | ||||||
|  | 												"currentyp02[0]", | ||||||
|  | 												"currentyp04[0]", | ||||||
|  | 												"currentyp05[0]", | ||||||
|  | 												"currentyp11[0]","yp1tab"]} --> | ||||||
|  | 					<div class="wp-block-uagb-tabs-child uagb-tabs__body-container uagb-tabs__inner-tab uagb-inner-tab-5"> | ||||||
|  | 					<div class="uagb-blocks__yearpoint12 uagb-tabs__body" aria-labelledby="uagb-tabs__tab5"> | ||||||
|  | 					<!-- wp:video {"id":1063} --><figure class="wp-block-video"> | ||||||
|  | 					<video controls loop src="currentyp12[1]"> | ||||||
|  | 					</video></figure><!-- /wp:video --></div></div><!-- /wp:uagb/tabs-child --></div></div> | ||||||
|  | 					<!-- /wp:uagb/tabs --> | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 			</string></value></member> | ||||||
|  | 			<member><name>title</name><value><string>Media</string></value></member> | ||||||
|  | 			<member><name>link</name><value><string>wppagelinkis</string></value></member> | ||||||
|  | 			<member><name>permaLink</name><value><string>wppagelinkis</string></value></member> | ||||||
|  | 			<member><name>categories</name><value><array><data></data></array></value></member> | ||||||
|  | 			<member><name>excerpt</name><value><string></string></value></member> | ||||||
|  | 			<member><name>text_more</name><value><string></string></value></member> | ||||||
|  | 			<member><name>mt_allow_comments</name><value><int>0</int></value></member> | ||||||
|  | 			<member><name>mt_allow_pings</name><value><int>0</int></value></member> | ||||||
|  | 			<member><name>wp_slug</name><value><string>media</string></value></member> | ||||||
|  | 			<member><name>wp_password</name><value><string></string></value></member> | ||||||
|  | 			<member><name>wp_author</name><value><string>wppageauthor</string></value></member> | ||||||
|  | 			<member><name>wp_page_parent_id</name><value><int>0</int></value></member> | ||||||
|  | 			<member><name>wp_page_parent_title</name><value><string></string></value></member> | ||||||
|  | 			<member><name>wp_page_order</name><value><int>0</int></value></member> | ||||||
|  | 			<member><name>wp_author_id</name><value><string>wpedituserid</string></value></member> | ||||||
|  | 			<member><name>wp_author_display_name</name><value><string>wppageauthor</string></value></member> | ||||||
|  | 			<member><name>date_created_gmt</name><value><dateTime.iso8601>wpeditdateis</dateTime.iso8601></value></member> | ||||||
|  | 			<member><name>custom_fields</name><value><array><data> | ||||||
|  | 				<value><struct> | ||||||
|  | 					<member><name>id</name><value><string>4258</string></value></member> | ||||||
|  | 					<member><name>key</name><value><string>content_display_featured_image</string></value></member> | ||||||
|  | 					<member><name>value</name><value><string>0</string></value></member> | ||||||
|  | 				</struct></value> | ||||||
|  | 				<value><struct> | ||||||
|  | 					<member><name>id</name><value><string>4257</string></value></member> | ||||||
|  | 					<member><name>key</name><value><string>content_display_title</string></value></member> | ||||||
|  | 					<member><name>value</name><value><string>0</string></value></member> | ||||||
|  | 				</struct></value> | ||||||
|  | 				<value><struct> | ||||||
|  | 					<member><name>id</name><value><string>4259</string></value></member> | ||||||
|  | 					<member><name>key</name><value><string>content_width</string></value></member> | ||||||
|  | 					<member><name>value</name><value><string>container</string></value></member> | ||||||
|  | 				</struct></value> | ||||||
|  | 				<value><struct> | ||||||
|  | 					<member><name>id</name><value><string>4253</string></value></member> | ||||||
|  | 					<member><name>key</name><value><string>disable_space_above_footer</string></value></member> | ||||||
|  | 					<member><name>value</name><value><string>0</string></value></member> | ||||||
|  | 				</struct></value> | ||||||
|  | 				<value><struct> | ||||||
|  | 					<member><name>id</name><value><string>4252</string></value></member> | ||||||
|  | 					<member><name>key</name><value><string>disable_space_below_header</string></value></member> | ||||||
|  | 					<member><name>value</name><value><string>0</string></value></member> | ||||||
|  | 				</struct></value> | ||||||
|  | 				<value><struct> | ||||||
|  | 					<member><name>id</name><value><string>4251</string></value></member> | ||||||
|  | 					<member><name>key</name><value><string>hide_footer</string></value></member> | ||||||
|  | 					<member><name>value</name><value><string>0</string></value></member> | ||||||
|  | 				</struct></value> | ||||||
|  | 				<value><struct> | ||||||
|  | 					<member><name>id</name><value><string>4250</string></value></member> | ||||||
|  | 					<member><name>key</name><value><string>hide_header</string></value></member> | ||||||
|  | 					<member><name>value</name><value><string>0</string></value></member> | ||||||
|  | 				</struct></value> | ||||||
|  | 				<value><struct> | ||||||
|  | 					<member><name>id</name><value><string>4254</string></value></member> | ||||||
|  | 					<member><name>key</name><value><string>hide_titlebar</string></value></member> | ||||||
|  | 					<member><name>value</name><value><string>0</string></value></member> | ||||||
|  | 				</struct></value> | ||||||
|  | 				<value><struct> | ||||||
|  | 					<member><name>id</name><value><string>4255</string></value></member> | ||||||
|  | 					<member><name>key</name><value><string>page_overwrite_defaults</string></value></member> | ||||||
|  | 					<member><name>value</name><value><string>0</string></value></member> | ||||||
|  | 				</struct></value> | ||||||
|  | 				<value><struct> | ||||||
|  | 					<member><name>id</name><value><string>4260</string></value></member> | ||||||
|  | 					<member><name>key</name><value><string>sidebar_layout</string></value></member> | ||||||
|  | 					<member><name>value</name><value><string>default-sidebar</string></value></member> | ||||||
|  | 				</struct></value> | ||||||
|  | 				<value><struct> | ||||||
|  | 					<member><name>id</name><value><string>4256</string></value></member> | ||||||
|  | 					<member><name>key</name><value><string>titlebar_padding</string></value></member> | ||||||
|  | 					<member><name>value</name><value><string>80</string></value></member> | ||||||
|  | 				</struct></value> | ||||||
|  | 			</data></array></value></member> | ||||||
|  | 			<member><name>wp_page_template</name><value><string>default</string></value></member> | ||||||
|  | 		</struct></value></param> | ||||||
|  | 	</params> | ||||||
|  | </methodCall> | ||||||
							
								
								
									
										524
									
								
								publisher.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										524
									
								
								publisher.sh
									
									
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,524 @@ | ||||||
|  | #! /bin/bash | ||||||
|  | 
 | ||||||
|  | # | ||||||
|  | ## DESCRIPTION: | ||||||
|  | #    Uploading MP4 to Wordpress and Telegram. | ||||||
|  | #    Additionally: | ||||||
|  | #    - editing Wordpress page from template | ||||||
|  | #    - recompressing video if size over 50MB | ||||||
|  | #    This is only a local "proof of conept" for testing and debugging. | ||||||
|  | # | ||||||
|  | 
 | ||||||
|  | # | ||||||
|  | ## DEPENDENCIES: sudo apt|yum install -y curl ffmpeg libxml2-utils jq | ||||||
|  | # | ||||||
|  | 
 | ||||||
|  | # | ||||||
|  | ## FUNCTIONS | ||||||
|  | # | ||||||
|  | 
 | ||||||
|  | addtologs() { | ||||||
|  | 	echo "$(date +'%Y.%m.%d-%H:%M:%S') $1" | tee -a $logs | ||||||
|  | } | ||||||
|  | execpause() { | ||||||
|  | 	read -p "Press [ENTER] to continue... " | ||||||
|  | } | ||||||
|  | execquite() { | ||||||
|  | 	addtologs "execution time is $(($(date +%s)-$time)) seconds, exit" | ||||||
|  | 	if [ "${show}" != "qn" ];then | ||||||
|  | 		execpause | ||||||
|  | 	fi | ||||||
|  | 	exit | ||||||
|  | } | ||||||
|  | execerror() { | ||||||
|  | 	addtologs "error: $1" | ||||||
|  | 	execquite | ||||||
|  | } | ||||||
|  | getconfig() { | ||||||
|  | 	logs=$(cat $conf | grep "logs=" | cut -d= -f2) | ||||||
|  | 	pathroot=$(cat $conf | grep "pathroot=" | cut -d= -f2) | ||||||
|  | 	vidnamesarray=($(cat $conf | grep "vidnamesarray=" | cut -d= -f2)) | ||||||
|  | 	telegramapiurl=$(cat $conf | grep "telegramapiurl=" | cut -d= -f2) | ||||||
|  | 	telegramchatid=$(cat $conf | grep "telegramchatid=" | cut -d= -f2) | ||||||
|  | 	tgpreviewlink=$(cat $conf | grep "tgpreviewlink=" | cut -d= -f2) | ||||||
|  | 	tgpreviewtext=$(cat $conf | grep "tgpreviewtext=" | cut -d= -f2) | ||||||
|  | 	wpxmlrpclink=$(cat $conf | grep "wpxmlrpclink=" | cut -d= -f2) | ||||||
|  | 	wpxmlrpcuser=$(cat $conf | grep "wpxmlrpcuser=" | cut -d= -f2) | ||||||
|  | 	wpxmlrpcpass=$(cat $conf | grep "wpxmlrpcpass=" | cut -d= -f2) | ||||||
|  | 	wppageauthor=$(cat $conf | grep "wppageauthor=" | cut -d= -f2) | ||||||
|  | 	wppagelinkis=$(cat $conf | grep "wppagelinkis=" | cut -d= -f2) | ||||||
|  | 	wpeditpageid=$(cat $conf | grep "wpeditpageid=" | cut -d= -f2) | ||||||
|  | 	wpedituserid=$(cat $conf | grep "wpedituserid=" | cut -d= -f2) | ||||||
|  | 	wpeditdateis=$(cat $conf | grep "wpeditdateis=" | cut -d= -f2) | ||||||
|  | 	wptemplateis=$(cat $conf | grep "wptemplateis=" | cut -d= -f2) | ||||||
|  | 	youtubelink=$(cat $conf | grep "youtubelink=" | cut -d= -f2) | ||||||
|  | 
 | ||||||
|  | 	defaultdp01=($(cat $conf | grep "defaultdp01=" | cut -d= -f2)) | ||||||
|  | 	defaultwp01=($(cat $conf | grep "defaultwp01=" | cut -d= -f2)) | ||||||
|  | 	defaultmp01=($(cat $conf | grep "defaultmp01=" | cut -d= -f2)) | ||||||
|  | 	defaultyp01=($(cat $conf | grep "defaultyp01=" | cut -d= -f2)) | ||||||
|  | 
 | ||||||
|  | 	defaultdp02=($(cat $conf | grep "defaultdp02=" | cut -d= -f2)) | ||||||
|  | 	defaultwp02=($(cat $conf | grep "defaultwp02=" | cut -d= -f2)) | ||||||
|  | 	defaultmp02=($(cat $conf | grep "defaultmp02=" | cut -d= -f2)) | ||||||
|  | 	defaultyp02=($(cat $conf | grep "defaultyp02=" | cut -d= -f2)) | ||||||
|  | 
 | ||||||
|  | 	defaultdp04=($(cat $conf | grep "defaultdp04=" | cut -d= -f2)) | ||||||
|  | 	defaultwp04=($(cat $conf | grep "defaultwp04=" | cut -d= -f2)) | ||||||
|  | 	defaultmp04=($(cat $conf | grep "defaultmp04=" | cut -d= -f2)) | ||||||
|  | 	defaultyp04=($(cat $conf | grep "defaultyp04=" | cut -d= -f2)) | ||||||
|  | 
 | ||||||
|  | 	defaultdp05=($(cat $conf | grep "defaultdp05=" | cut -d= -f2)) | ||||||
|  | 	defaultwp05=($(cat $conf | grep "defaultwp05=" | cut -d= -f2)) | ||||||
|  | 	defaultmp05=($(cat $conf | grep "defaultmp05=" | cut -d= -f2)) | ||||||
|  | 	defaultyp05=($(cat $conf | grep "defaultyp05=" | cut -d= -f2)) | ||||||
|  | 
 | ||||||
|  | 	defaultdp11=($(cat $conf | grep "defaultdp11=" | cut -d= -f2)) | ||||||
|  | 	defaultwp11=($(cat $conf | grep "defaultwp11=" | cut -d= -f2)) | ||||||
|  | 	defaultmp11=($(cat $conf | grep "defaultmp11=" | cut -d= -f2)) | ||||||
|  | 	defaultyp11=($(cat $conf | grep "defaultyp11=" | cut -d= -f2)) | ||||||
|  | 
 | ||||||
|  | 	defaultdp12=($(cat $conf | grep "defaultdp12=" | cut -d= -f2)) | ||||||
|  | 	defaultwp12=($(cat $conf | grep "defaultwp12=" | cut -d= -f2)) | ||||||
|  | 	defaultmp12=($(cat $conf | grep "defaultmp12=" | cut -d= -f2)) | ||||||
|  | 	defaultyp12=($(cat $conf | grep "defaultyp12=" | cut -d= -f2)) | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 	currentdp01=($(cat $conf | grep "currentdp01=" | cut -d= -f2)) | ||||||
|  | 	if [ -z "$currentdp01" ];then | ||||||
|  | 		currentdp01=(${defaultdp01[*]}) | ||||||
|  | 	fi | ||||||
|  | 	currentwp01=($(cat $conf | grep "currentwp01=" | cut -d= -f2)) | ||||||
|  | 	if [ -z "$currentwp01" ];then | ||||||
|  | 		currentwp01=(${defaultwp01[*]}) | ||||||
|  | 	fi | ||||||
|  | 	currentmp01=($(cat $conf | grep "currentmp01=" | cut -d= -f2)) | ||||||
|  | 		if [ -z "$currentmp01" ];then | ||||||
|  | 		currentmp01=(${defaultmp01[*]}) | ||||||
|  | 	fi | ||||||
|  | 	currentyp01=($(cat $conf | grep "currentyp01=" | cut -d= -f2)) | ||||||
|  | 	if [ -z "$currentyp01" ];then | ||||||
|  | 		currentyp01=(${defaultyp01[*]}) | ||||||
|  | 	fi | ||||||
|  | 
 | ||||||
|  | 	currentdp02=($(cat $conf | grep "currentdp02=" | cut -d= -f2)) | ||||||
|  | 	if [ -z "$currentdp02" ];then | ||||||
|  | 		currentdp02=(${defaultdp02[*]}) | ||||||
|  | 	fi | ||||||
|  | 	currentwp02=($(cat $conf | grep "currentwp02=" | cut -d= -f2)) | ||||||
|  | 	if [ -z "$currentwp02" ];then | ||||||
|  | 		currentwp02=(${defaultwp02[*]}) | ||||||
|  | 	fi | ||||||
|  | 	currentmp02=($(cat $conf | grep "currentmp02=" | cut -d= -f2)) | ||||||
|  | 	if [ -z "$currentmp02" ];then | ||||||
|  | 		currentmp02=(${defaultmp02[*]}) | ||||||
|  | 	fi | ||||||
|  | 	currentyp02=($(cat $conf | grep "currentyp02=" | cut -d= -f2)) | ||||||
|  | 	if [ -z "$currentyp02" ];then | ||||||
|  | 		currentyp02=(${defaultyp02[*]}) | ||||||
|  | 	fi | ||||||
|  | 
 | ||||||
|  | 	currentdp04=($(cat $conf | grep "currentdp04=" | cut -d= -f2)) | ||||||
|  | 	if [ -z "$currentdp04" ];then | ||||||
|  | 		currentdp04=(${defaultdp04[*]}) | ||||||
|  | 	fi | ||||||
|  | 	currentwp04=($(cat $conf | grep "currentwp04=" | cut -d= -f2)) | ||||||
|  | 	if [ -z "$currentwp04" ];then | ||||||
|  | 		currentwp04=(${defaultwp04[*]}) | ||||||
|  | 	fi | ||||||
|  | 	currentmp04=($(cat $conf | grep "currentmp04=" | cut -d= -f2)) | ||||||
|  | 	if [ -z "$currentmp04" ];then | ||||||
|  | 		currentmp04=(${defaultmp04[*]}) | ||||||
|  | 	fi | ||||||
|  | 	currentyp04=($(cat $conf | grep "currentyp04=" | cut -d= -f2)) | ||||||
|  | 	if [ -z "$currentyp04" ];then | ||||||
|  | 		currentyp04=(${defaultyp04[*]}) | ||||||
|  | 	fi | ||||||
|  | 
 | ||||||
|  | 	currentdp05=($(cat $conf | grep "currentdp05=" | cut -d= -f2)) | ||||||
|  | 	if [ -z "$currentdp05" ];then | ||||||
|  | 		currentdp05=(${defaultdp05[*]}) | ||||||
|  | 	fi | ||||||
|  | 	currentwp05=($(cat $conf | grep "currentwp05=" | cut -d= -f2)) | ||||||
|  | 	if [ -z "$currentwp05" ];then | ||||||
|  | 		currentwp05=(${defaultwp05[*]}) | ||||||
|  | 	fi | ||||||
|  | 	currentmp05=($(cat $conf | grep "currentmp05=" | cut -d= -f2)) | ||||||
|  | 	if [ -z "$currentmp05" ];then | ||||||
|  | 		currentmp05=(${defaultmp05[*]}) | ||||||
|  | 	fi | ||||||
|  | 	currentyp05=($(cat $conf | grep "currentyp05=" | cut -d= -f2)) | ||||||
|  | 	if [ -z "$currentyp05" ];then | ||||||
|  | 		currentyp05=(${defaultyp05[*]}) | ||||||
|  | 	fi | ||||||
|  | 
 | ||||||
|  | 	currentdp11=($(cat $conf | grep "currentdp11=" | cut -d= -f2)) | ||||||
|  | 	if [ -z "$currentdp11" ];then | ||||||
|  | 		currentdp11=(${defaultdp11[*]}) | ||||||
|  | 	fi | ||||||
|  | 	currentwp11=($(cat $conf | grep "currentwp11=" | cut -d= -f2)) | ||||||
|  | 	if [ -z "$currentwp11" ];then | ||||||
|  | 		currentwp11=(${defaultwp11[*]}) | ||||||
|  | 	fi | ||||||
|  | 	currentmp11=($(cat $conf | grep "currentmp11=" | cut -d= -f2)) | ||||||
|  | 	if [ -z "$currentmp11" ];then | ||||||
|  | 		currentmp11=(${defaultmp11[*]}) | ||||||
|  | 	fi | ||||||
|  | 	currentyp11=($(cat $conf | grep "currentyp11=" | cut -d= -f2)) | ||||||
|  | 	if [ -z "$currentyp11" ];then | ||||||
|  | 		currentyp11=(${defaultyp11[*]}) | ||||||
|  | 	fi | ||||||
|  | 
 | ||||||
|  | 	currentdp12=($(cat $conf | grep "currentdp12=" | cut -d= -f2)) | ||||||
|  | 	if [ -z "$currentdp12" ];then | ||||||
|  | 		currentdp12=(${defaultdp12[*]}) | ||||||
|  | 	fi | ||||||
|  | 	currentwp12=($(cat $conf | grep "currentwp12=" | cut -d= -f2)) | ||||||
|  | 	if [ -z "$currentwp12" ];then | ||||||
|  | 		currentwp12=(${defaultwp12[*]}) | ||||||
|  | 	fi | ||||||
|  | 	currentmp12=($(cat $conf | grep "currentmp12=" | cut -d= -f2)) | ||||||
|  | 	if [ -z "$currentmp12" ];then | ||||||
|  | 		currentmp12=(${defaultmp12[*]}) | ||||||
|  | 	fi | ||||||
|  | 	currentyp12=($(cat $conf | grep "currentyp12=" | cut -d= -f2)) | ||||||
|  | 	if [ -z "$currentyp12" ];then | ||||||
|  | 		currentyp12=(${defaultyp12[*]}) | ||||||
|  | 	fi | ||||||
|  | } | ||||||
|  | setconfig() { | ||||||
|  | 	if [ -z "$target" ] || [ "$target" == "-d" ];then | ||||||
|  | 		if [ ! -z "${vidnamesarray[0]}" ] && [ ! -z "${vidlinksarray[0]}" ];then | ||||||
|  | 			sed -i "s#$(cat $conf | grep 'currentdp01=')#currentdp01=${vidnamesarray[0]} ${vidlinksarray[0]}#" $conf | ||||||
|  | 		fi | ||||||
|  | 		if [ ! -z "${vidnamesarray[1]}" ] && [ ! -z "${vidlinksarray[1]}" ];then | ||||||
|  | 			sed -i "s#$(cat $conf | grep 'currentdp02=')#currentdp02=${vidnamesarray[1]} ${vidlinksarray[1]}#" $conf | ||||||
|  | 		fi | ||||||
|  | 		if [ ! -z "${vidnamesarray[2]}" ] && [ ! -z "${vidlinksarray[2]}" ];then | ||||||
|  | 			sed -i "s#$(cat $conf | grep 'currentdp04=')#currentdp04=${vidnamesarray[2]} ${vidlinksarray[2]}#" $conf | ||||||
|  | 		fi | ||||||
|  | 		if [ ! -z "${vidnamesarray[3]}" ] && [ ! -z "${vidlinksarray[3]}" ];then | ||||||
|  | 			sed -i "s#$(cat $conf | grep 'currentdp05=')#currentdp05=${vidnamesarray[3]} ${vidlinksarray[3]}#" $conf | ||||||
|  | 		fi | ||||||
|  | 		if [ ! -z "${vidnamesarray[4]}" ] && [ ! -z "${vidlinksarray[4]}" ];then | ||||||
|  | 			sed -i "s#$(cat $conf | grep 'currentdp11=')#currentdp11=${vidnamesarray[4]} ${vidlinksarray[4]}#" $conf | ||||||
|  | 		fi | ||||||
|  | 		if [ ! -z "${vidnamesarray[5]}" ] && [ ! -z "${vidlinksarray[5]}" ];then | ||||||
|  | 			sed -i "s#$(cat $conf | grep 'currentdp12=')#currentdp12=${vidnamesarray[5]} ${vidlinksarray[5]}#" $conf | ||||||
|  | 		fi | ||||||
|  | 	fi | ||||||
|  | 	if [ "$target" == "-w" ];then | ||||||
|  | 		if [ ! -z "${vidnamesarray[0]}" ] && [ ! -z "${vidlinksarray[0]}" ];then | ||||||
|  | 			sed -i "s#$(cat $conf | grep 'currentwp01=')#currentwp01=${vidnamesarray[0]} ${vidlinksarray[0]}#" $conf | ||||||
|  | 		fi | ||||||
|  | 		if [ ! -z "${vidnamesarray[1]}" ] && [ ! -z "${vidlinksarray[1]}" ];then | ||||||
|  | 			sed -i "s#$(cat $conf | grep 'currentwp02=')#currentwp02=${vidnamesarray[1]} ${vidlinksarray[1]}#" $conf | ||||||
|  | 		fi | ||||||
|  | 		if [ ! -z "${vidnamesarray[2]}" ] && [ ! -z "${vidlinksarray[2]}" ];then | ||||||
|  | 			sed -i "s#$(cat $conf | grep 'currentwp04=')#currentwp04=${vidnamesarray[2]} ${vidlinksarray[2]}#" $conf | ||||||
|  | 		fi | ||||||
|  | 		if [ ! -z "${vidnamesarray[3]}" ] && [ ! -z "${vidlinksarray[3]}" ];then | ||||||
|  | 			sed -i "s#$(cat $conf | grep 'currentwp05=')#currentwp05=${vidnamesarray[3]} ${vidlinksarray[3]}#" $conf | ||||||
|  | 		fi | ||||||
|  | 		if [ ! -z "${vidnamesarray[4]}" ] && [ ! -z "${vidlinksarray[4]}" ];then | ||||||
|  | 			sed -i "s#$(cat $conf | grep 'currentwp11=')#currentwp11=${vidnamesarray[4]} ${vidlinksarray[4]}#" $conf | ||||||
|  | 		fi | ||||||
|  | 		if [ ! -z "${vidnamesarray[5]}" ] && [ ! -z "${vidlinksarray[5]}" ];then | ||||||
|  | 			sed -i "s#$(cat $conf | grep 'currentwp12=')#currentwp12=${vidnamesarray[5]} ${vidlinksarray[5]}#" $conf | ||||||
|  | 		fi | ||||||
|  | 	fi | ||||||
|  | 	if [ "$target" == "-m" ];then | ||||||
|  | 		if [ ! -z "${vidnamesarray[0]}" ] && [ ! -z "${vidlinksarray[0]}" ];then | ||||||
|  | 			sed -i "s#$(cat $conf | grep 'currentmp01=')#currentmp01=${vidnamesarray[0]} ${vidlinksarray[0]}#" $conf | ||||||
|  | 		fi | ||||||
|  | 		if [ ! -z "${vidnamesarray[1]}" ] && [ ! -z "${vidlinksarray[1]}" ];then | ||||||
|  | 			sed -i "s#$(cat $conf | grep 'currentmp02=')#currentmp02=${vidnamesarray[1]} ${vidlinksarray[1]}#" $conf | ||||||
|  | 		fi | ||||||
|  | 		if [ ! -z "${vidnamesarray[2]}" ] && [ ! -z "${vidlinksarray[2]}" ];then | ||||||
|  | 			sed -i "s#$(cat $conf | grep 'currentmp04=')#currentmp04=${vidnamesarray[2]} ${vidlinksarray[2]}#" $conf | ||||||
|  | 		fi | ||||||
|  | 		if [ ! -z "${vidnamesarray[3]}" ] && [ ! -z "${vidlinksarray[3]}" ];then | ||||||
|  | 			sed -i "s#$(cat $conf | grep 'currentmp05=')#currentmp05=${vidnamesarray[3]} ${vidlinksarray[3]}#" $conf | ||||||
|  | 		fi | ||||||
|  | 		if [ ! -z "${vidnamesarray[4]}" ] && [ ! -z "${vidlinksarray[4]}" ];then | ||||||
|  | 			sed -i "s#$(cat $conf | grep 'currentmp11=')#currentmp11=${vidnamesarray[4]} ${vidlinksarray[4]}#" $conf | ||||||
|  | 		fi | ||||||
|  | 		if [ ! -z "${vidnamesarray[5]}" ] && [ ! -z "${vidlinksarray[5]}" ];then | ||||||
|  | 			sed -i "s#$(cat $conf | grep 'currentmp12=')#currentmp12=${vidnamesarray[5]} ${vidlinksarray[5]}#" $conf | ||||||
|  | 		fi | ||||||
|  | 	fi | ||||||
|  | 	if [ "$target" == "-y" ];then | ||||||
|  | 		if [ ! -z "${vidnamesarray[0]}" ] && [ ! -z "${vidlinksarray[0]}" ];then | ||||||
|  | 			sed -i "s#$(cat $conf | grep 'currentyp01=')#currentyp01=${vidnamesarray[0]} ${vidlinksarray[0]}#" $conf | ||||||
|  | 		fi | ||||||
|  | 		if [ ! -z "${vidnamesarray[1]}" ] && [ ! -z "${vidlinksarray[1]}" ];then | ||||||
|  | 			sed -i "s#$(cat $conf | grep 'currentyp02=')#currentyp02=${vidnamesarray[1]} ${vidlinksarray[1]}#" $conf | ||||||
|  | 		fi | ||||||
|  | 		if [ ! -z "${vidnamesarray[2]}" ] && [ ! -z "${vidlinksarray[2]}" ];then | ||||||
|  | 			sed -i "s#$(cat $conf | grep 'currentyp04=')#currentyp04=${vidnamesarray[2]} ${vidlinksarray[2]}#" $conf | ||||||
|  | 		fi | ||||||
|  | 		if [ ! -z "${vidnamesarray[3]}" ] && [ ! -z "${vidlinksarray[3]}" ];then | ||||||
|  | 			sed -i "s#$(cat $conf | grep 'currentyp05=')#currentyp05=${vidnamesarray[3]} ${vidlinksarray[3]}#" $conf | ||||||
|  | 		fi | ||||||
|  | 		if [ ! -z "${vidnamesarray[4]}" ] && [ ! -z "${vidlinksarray[4]}" ];then | ||||||
|  | 			sed -i "s#$(cat $conf | grep 'currentyp11=')#currentyp11=${vidnamesarray[4]} ${vidlinksarray[4]}#" $conf | ||||||
|  | 		fi | ||||||
|  | 		if [ ! -z "${vidnamesarray[5]}" ] && [ ! -z "${vidlinksarray[5]}" ];then | ||||||
|  | 			sed -i "s#$(cat $conf | grep 'currentyp12=')#currentyp12=${vidnamesarray[5]} ${vidlinksarray[5]}#" $conf | ||||||
|  | 		fi | ||||||
|  | 	fi | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | # | ||||||
|  | ## PARAMETERS | ||||||
|  | # | ||||||
|  | 
 | ||||||
|  | show=${1} | ||||||
|  | conf=${2} | ||||||
|  | if [ -z "${conf}" ] || [ "${conf}" == "-" ];then | ||||||
|  | 	conf="$(dirname $(realpath "$0"))/$(basename -s .sh $0).conf" | ||||||
|  | fi | ||||||
|  | ever=${4} | ||||||
|  | if [ -z "$ever" ] || [ "$ever" == "-" ];then | ||||||
|  | 	ever=1 | ||||||
|  | fi | ||||||
|  | if [ ! -z $(echo "$ever" | grep -o "^[0-9][0-9]*$") ];then | ||||||
|  | 	: | ||||||
|  | else | ||||||
|  | 	execerror "$ever - wrong argument" | ||||||
|  | fi | ||||||
|  | when=${3} | ||||||
|  | if [ -z "$when" ];then | ||||||
|  | 	viddate=$(date +"%Y").$(date +"%m").$(date +"%d") | ||||||
|  | fi | ||||||
|  | if [ "$when" == "-d" ];then | ||||||
|  | 	d=$(date -d "-${ever} day" +"%d") | ||||||
|  | 	m=$(date +"%m") | ||||||
|  | 	if [ "$(date -d "-${ever} day" +'%m')" != "$(date +'%m')" ];then | ||||||
|  | 		m=$(date -d "-${ever} day" +'%m') | ||||||
|  | 	fi | ||||||
|  | 	y=$(date +"%Y") | ||||||
|  | 	if [ "$(date -d "-${ever} day" +'%Y')" != "$(date +'%Y')" ];then | ||||||
|  | 		y=$(date -d "-${ever} day" +'%Y') | ||||||
|  | 	fi | ||||||
|  | 	viddate=${y}.${m}.${d} | ||||||
|  | fi | ||||||
|  | if [ "$when" == "-w" ];then | ||||||
|  | 	w=$(date -d "-${ever} week" +"%V") | ||||||
|  | 	y=$(date +"%Y") | ||||||
|  | 	if [ "$(date -d "-${ever} week" +'%Y')" != "$(date +'%Y')" ];then | ||||||
|  | 		y=$(date -d "-${ever} week" +'%Y') | ||||||
|  | 	fi | ||||||
|  | 	viddate=${y}-w${w} | ||||||
|  | fi | ||||||
|  | if [ "$when" == "-m" ];then | ||||||
|  | 	m=$(date -d "-${ever} month" +"%m") | ||||||
|  | 	y=$(date +"%Y") | ||||||
|  | 	if [ "$(date -d "-${ever} month" +'%Y')" != "$(date +'%Y')" ];then | ||||||
|  | 		y=$(date -d "-${ever} month" +'%Y') | ||||||
|  | 	fi | ||||||
|  | 	viddate=${y}.${m} | ||||||
|  | fi | ||||||
|  | if [ "$when" == "-y" ];then | ||||||
|  | 	y=$(date -d "-${ever} year" +"%Y") | ||||||
|  | 	viddate=${y} | ||||||
|  | fi | ||||||
|  | vidname=${viddate}.mp4 | ||||||
|  | only=${5} | ||||||
|  | 
 | ||||||
|  | # | ||||||
|  | ## VARIABLES | ||||||
|  | # | ||||||
|  | 
 | ||||||
|  | time=$(date +%s) | ||||||
|  | cd "$(dirname "$(realpath "$0")")" | ||||||
|  | if [ ! -e ${conf} ];then | ||||||
|  | 	execerror "Not found config file: ${conf}" | ||||||
|  | else | ||||||
|  | 	getconfig | ||||||
|  | fi | ||||||
|  | if [ -z "${logs}" ];then | ||||||
|  | 	logs=/dev/null | ||||||
|  | elif [ ! -e ${logs} ];then | ||||||
|  | 	touch ${logs} | ||||||
|  | fi | ||||||
|  | if ! command -v curl &> /dev/null || ! command -v ffmpeg &> /dev/null || ! command -v xmllint &> /dev/null || ! command -v jq &> /dev/null; then | ||||||
|  |     execerror "Not found dependencies" | ||||||
|  | fi | ||||||
|  | 
 | ||||||
|  | # | ||||||
|  | ## RUN | ||||||
|  | # | ||||||
|  | 
 | ||||||
|  | vidpathsarray=() | ||||||
|  | vidlinksarray=() | ||||||
|  | vidtgidsarray=() | ||||||
|  | vidtgcpsarray=() | ||||||
|  | for name in ${vidnamesarray[*]} | ||||||
|  | do | ||||||
|  | 	vidmatch=$name\_$vidname | ||||||
|  | 	while read FILE; do | ||||||
|  | 		vidpathsarray+=("${FILE}") | ||||||
|  | 	done < <(find $pathroot -name "*$vidmatch" | sort) | ||||||
|  | done | ||||||
|  | for item in "${!vidpathsarray[@]}" | ||||||
|  | do | ||||||
|  | 	### WORDPRESS UPLOAD VIDEO | ||||||
|  | 	if [ ! "$only" == "--onlytg" ];then | ||||||
|  | 		# This realisation isn't optimal, but it fixes a few issues with large files: | ||||||
|  | 		#    variable=$(base64 $file)                      -> "xrealloc: cannot allocate" | ||||||
|  | 		#    response=$(curl -X POST -d @${file}.xml $url) -> "curl: option -d: out of memory" | ||||||
|  | 		filetype=video/mp4 | ||||||
|  | 		echo '<?xml version="1.0"?> | ||||||
|  | 		<methodCall><methodName>wp.uploadFile</methodName> | ||||||
|  | 		<params> | ||||||
|  | 		<param><value>1</value></param> | ||||||
|  | 		<param><value>'"${wpxmlrpcuser}"'</value></param> | ||||||
|  | 		<param><value>'"${wpxmlrpcpass}"'</value></param> | ||||||
|  | 		<param><value><struct> | ||||||
|  | 		<member><name>name</name><value><string>'"$(basename ${vidpathsarray[$item]})"'</string></value></member> | ||||||
|  | 		<member><name>type</name><value><string>'"${filetype}"'</string></value></member> | ||||||
|  | 		<member><name>bits</name><value><base64>' > ${vidpathsarray[$item]}.xml | ||||||
|  | 		base64 --wrap=0 ${vidpathsarray[$item]} >> ${vidpathsarray[$item]}.xml | ||||||
|  | 		echo '</base64></value></member> | ||||||
|  | 		</struct></value></param> | ||||||
|  | 		</params> | ||||||
|  | 		</methodCall>' >> ${vidpathsarray[$item]}.xml | ||||||
|  | 		curl -X POST -T ${vidpathsarray[$item]}.xml $wpxmlrpclink > ${vidpathsarray[$item]}-response.xml \ | ||||||
|  | 		&& vidlinksarray+=("$(xmllint --xpath '//member[contains(name,"link")]/value/string/text()' ${vidpathsarray[$item]}-response.xml)") \ | ||||||
|  | 		&& vidlinkcodeis=$(curl --output /dev/null --silent --write-out "%{http_code}" ${vidlinksarray[$item]}) \ | ||||||
|  | 		|| execerror "${vidpathsarray[$item]}-response.xml" | ||||||
|  | 		if [[ ${vidlinkcodeis} -eq 200 ]];then | ||||||
|  | 			rm ${vidpathsarray[$item]}.xml | ||||||
|  | 			rm ${vidpathsarray[$item]}-response.xml | ||||||
|  | 			echo "$(date +'%Y.%m.%d-%H:%M:%S') sent ${vidpathsarray[$item]} to ${vidlinksarray[$item]}" | tee -a $logs | ||||||
|  | 			echo -e "WORDPRESS UPLOAD VIDEO RESULT:" | ||||||
|  | 			echo -e "item: $item" | ||||||
|  | 			echo -e "type: $filetype" | ||||||
|  | 			echo -e "name: ${vidnamesarray[$item]}" | ||||||
|  | 			echo -e "base: $(basename ${vidpathsarray[$item]})" | ||||||
|  | 			echo -e "path: ${vidpathsarray[$item]}" | ||||||
|  | 			echo -e "link: ${vidlinksarray[$item]}" | ||||||
|  | 			echo -e "code: $vidlinkcodeis" | ||||||
|  | 		else | ||||||
|  | 			vidlinksarray[$item]='' | ||||||
|  | 		fi | ||||||
|  | 	fi | ||||||
|  | 	### TELEGRAM SEND/UPLOAD VIDEO | ||||||
|  | 	if [ ! "$only" == "--onlywp" ];then | ||||||
|  | 		videofullpath=${vidpathsarray[$item]} | ||||||
|  | 		vidcompressed=$(echo ${vidpathsarray[$item]} | sed -e 's/.mp4/-compressed.mp4/g') | ||||||
|  | 		if [ -n "$(find "$videofullpath" -prune -size +51380224c)" ];then | ||||||
|  | 			duration=$(ffprobe -i "$videofullpath" -show_entries format=duration -v quiet -of csv="p=0" | cut -d'.' -f 1) \ | ||||||
|  | 			&& ffmpeg -i "$videofullpath" -c:v libx264 -b:v $((49*8*1000/$duration))k -vf "scale=960:540,fps=25,format=yuv420p" -preset veryslow "$vidcompressed" -y -loglevel quiet -stats \ | ||||||
|  | 			&& videofullpath=$vidcompressed \ | ||||||
|  | 			|| execerror "ffmpeg convert ${videofullpath} to ${vidcompressed}" | ||||||
|  | 		fi | ||||||
|  | 		response=$(curl -s -F chat_id=$telegramchatid \ | ||||||
|  | 				   -F video=@${videofullpath} \ | ||||||
|  | 				   -F caption="$(echo $(basename ${videofullpath}) | sed -e 's/.mp4//g')" \ | ||||||
|  | 				   $telegramapiurl/sendVideo) \ | ||||||
|  | 		&& curl -s -F chat_id=$telegramchatid \ | ||||||
|  | 			   -F message_id=$(echo $response | jq -r '.result.message_id') \ | ||||||
|  | 			   $telegramapiurl/deleteMessage \ | ||||||
|  | 		&& vidtgidsarray+=("$(echo $response | jq -r '.result.video.file_id')") \ | ||||||
|  | 		&& vidtgcpsarray+=("$(echo $response | jq -r '.result.caption')") \ | ||||||
|  | 		&& echo "$(date +'%Y.%m.%d-%H:%M:%S') sent ${videofullpath} to ${vidtgidsarray[$item]} Telegram file ID" | tee -a $logs \ | ||||||
|  | 		|| execerror "sent ${videofullpath} to $telegramchatid Telegram Chat ID" | ||||||
|  | 		if [ -e $vidcompressed ];then | ||||||
|  | 			rm $vidcompressed | ||||||
|  | 		fi | ||||||
|  | 	fi | ||||||
|  | done | ||||||
|  | ### TELEGRAM SEND MEDIAGROUP | ||||||
|  | if [ ! "$only" == "--onlywp" ];then | ||||||
|  | 	response=$(curl -s -F chat_id=$telegramchatid \ | ||||||
|  | 			   -F media='[ | ||||||
|  | 			   {"type":"photo","media":"'${tgpreviewlink}'","caption":"period: '${viddate}'\nsource: '${tgpreviewtext}'\nstream: '${youtubelink}'"}, | ||||||
|  | 			   {"type":"video","media":"'${vidtgidsarray[0]}'"}, | ||||||
|  | 			   {"type":"video","media":"'${vidtgidsarray[1]}'"}, | ||||||
|  | 			   {"type":"video","media":"'${vidtgidsarray[2]}'"}, | ||||||
|  | 			   {"type":"video","media":"'${vidtgidsarray[3]}'"}, | ||||||
|  | 			   {"type":"video","media":"'${vidtgidsarray[4]}'"}, | ||||||
|  | 			   {"type":"video","media":"'${vidtgidsarray[5]}'"}]' \ | ||||||
|  | 			   -H "Content-Type:multipart/form-data" \ | ||||||
|  | 			   $telegramapiurl/sendMediaGroup) | ||||||
|  | fi | ||||||
|  | ### WORDPRESS UPDATE PAGE | ||||||
|  | if [ ! "$only" == "--onlytg" ];then | ||||||
|  | 	setconfig | ||||||
|  | 	getconfig | ||||||
|  | 	xml=$(cat ./${wptemplateis}) | ||||||
|  | 
 | ||||||
|  | 	xml=${xml//wpeditpageid/${wpeditpageid}} | ||||||
|  | 	xml=${xml//wpxmlrpcuser/${wpxmlrpcuser}} | ||||||
|  | 	xml=${xml//wpxmlrpcpass/${wpxmlrpcpass}} | ||||||
|  | 
 | ||||||
|  | 	xml=${xml//youtubelink/${youtubelink}} | ||||||
|  | 
 | ||||||
|  | 	xml=${xml//"currentdp01[0]"/${currentdp01[0]}} | ||||||
|  | 	xml=${xml//"currentdp01[1]"/${currentdp01[1]}} | ||||||
|  | 	xml=${xml//"currentdp02[0]"/${currentdp02[0]}} | ||||||
|  | 	xml=${xml//"currentdp02[1]"/${currentdp02[1]}} | ||||||
|  | 	xml=${xml//"currentdp04[0]"/${currentdp04[0]}} | ||||||
|  | 	xml=${xml//"currentdp04[1]"/${currentdp04[1]}} | ||||||
|  | 	xml=${xml//"currentdp05[0]"/${currentdp05[0]}} | ||||||
|  | 	xml=${xml//"currentdp05[1]"/${currentdp05[1]}} | ||||||
|  | 	xml=${xml//"currentdp11[0]"/${currentdp11[0]}} | ||||||
|  | 	xml=${xml//"currentdp11[1]"/${currentdp11[1]}} | ||||||
|  | 	xml=${xml//"currentdp12[0]"/${currentdp12[0]}} | ||||||
|  | 	xml=${xml//"currentdp12[1]"/${currentdp12[1]}} | ||||||
|  | 
 | ||||||
|  | 	xml=${xml//"currentwp01[0]"/${currentwp01[0]}} | ||||||
|  | 	xml=${xml//"currentwp01[1]"/${currentwp01[1]}} | ||||||
|  | 	xml=${xml//"currentwp02[0]"/${currentwp02[0]}} | ||||||
|  | 	xml=${xml//"currentwp02[1]"/${currentwp02[1]}} | ||||||
|  | 	xml=${xml//"currentwp04[0]"/${currentwp04[0]}} | ||||||
|  | 	xml=${xml//"currentwp04[1]"/${currentwp04[1]}} | ||||||
|  | 	xml=${xml//"currentwp05[0]"/${currentwp05[0]}} | ||||||
|  | 	xml=${xml//"currentwp05[1]"/${currentwp05[1]}} | ||||||
|  | 	xml=${xml//"currentwp11[0]"/${currentwp11[0]}} | ||||||
|  | 	xml=${xml//"currentwp11[1]"/${currentwp11[1]}} | ||||||
|  | 	xml=${xml//"currentwp12[0]"/${currentwp12[0]}} | ||||||
|  | 	xml=${xml//"currentwp12[1]"/${currentwp12[1]}} | ||||||
|  | 
 | ||||||
|  | 	xml=${xml//"currentmp01[0]"/${currentmp01[0]}} | ||||||
|  | 	xml=${xml//"currentmp01[1]"/${currentmp01[1]}} | ||||||
|  | 	xml=${xml//"currentmp02[0]"/${currentmp02[0]}} | ||||||
|  | 	xml=${xml//"currentmp02[1]"/${currentmp02[1]}} | ||||||
|  | 	xml=${xml//"currentmp04[0]"/${currentmp04[0]}} | ||||||
|  | 	xml=${xml//"currentmp04[1]"/${currentmp04[1]}} | ||||||
|  | 	xml=${xml//"currentmp05[0]"/${currentmp05[0]}} | ||||||
|  | 	xml=${xml//"currentmp05[1]"/${currentmp05[1]}} | ||||||
|  | 	xml=${xml//"currentmp11[0]"/${currentmp11[0]}} | ||||||
|  | 	xml=${xml//"currentmp11[1]"/${currentmp11[1]}} | ||||||
|  | 	xml=${xml//"currentmp12[0]"/${currentmp12[0]}} | ||||||
|  | 	xml=${xml//"currentmp12[1]"/${currentmp12[1]}} | ||||||
|  | 
 | ||||||
|  | 	xml=${xml//"currentyp01[0]"/${currentyp01[0]}} | ||||||
|  | 	xml=${xml//"currentyp01[1]"/${currentyp01[1]}} | ||||||
|  | 	xml=${xml//"currentyp02[0]"/${currentyp02[0]}} | ||||||
|  | 	xml=${xml//"currentyp02[1]"/${currentyp02[1]}} | ||||||
|  | 	xml=${xml//"currentyp04[0]"/${currentyp04[0]}} | ||||||
|  | 	xml=${xml//"currentyp04[1]"/${currentyp04[1]}} | ||||||
|  | 	xml=${xml//"currentyp05[0]"/${currentyp05[0]}} | ||||||
|  | 	xml=${xml//"currentyp05[1]"/${currentyp05[1]}} | ||||||
|  | 	xml=${xml//"currentyp11[0]"/${currentyp11[0]}} | ||||||
|  | 	xml=${xml//"currentyp11[1]"/${currentyp11[1]}} | ||||||
|  | 	xml=${xml//"currentyp12[0]"/${currentyp12[0]}} | ||||||
|  | 	xml=${xml//"currentyp12[1]"/${currentyp12[1]}} | ||||||
|  | 
 | ||||||
|  | 	xml=${xml//wpedituserid/${wpedituserid}} | ||||||
|  | 	xml=${xml//wppageauthor/${wppageauthor}} | ||||||
|  | 	xml=${xml//wppagelinkis/${wppagelinkis}} | ||||||
|  | 	xml=${xml//wpeditdateis/${wpeditdateis}} | ||||||
|  | 
 | ||||||
|  | 	response=$(curl -d "$xml" $wpxmlrpclink) | ||||||
|  | 	if echo "$response" | grep -q '<boolean>1</boolean>';then | ||||||
|  | 		addtologs "update $(echo "$xml" | grep 'Link' | cut -d'>' -f 6 | cut -d'<' -f 1))" | ||||||
|  | 	else | ||||||
|  | 		echo $response | xmllint --format - > $pathroot/wp-page${wpeditpageid}-response.xml 2>/dev/null | ||||||
|  | 		execerror "$pathroot/wp-page${wpeditpageid}-response.xml" | ||||||
|  | 	fi | ||||||
|  | fi | ||||||
|  | execquite | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user